[EMAIL PROTECTED] writes: > Apologies for such a trivial question. I am trying to "PUT" a file from my > local machine into a remote location, however I get a return "HTTP/1.1 204 > no Content" even though my local file blatantly contains stuff.
204 seems to be a resonable answer for a PUT. It means, the server successfully handled your request, but does not send you any content back. I would expect the server to store your file. 201 (Created) would be a other answer for a PUT. PT RESPONSE > Yes, I get a 201 and it creates the file successfully. However, I then get a 204-No Content back from the server. The client that hangs for a bit. > When I look on the remote filesystem, I see a file with my local filename > has been created, but it's empty of course. But thats not okay. If the server sends something in the 2xx range, it should have been successful in storeing the data. Are you sure you really send data ? PT RESPONSE > I've added debug messages to the HttpClient, HttpMethod and PutMethod classes. Please see output trail below. What does the server log say about the request? What is your server/client? PT > My client is org.apache.webdav.cmd.Slide from jakarta-slide-1.0.16. The server is some remote WebDav server and that's all we know. PT > I am really sorry for spamming everyone with the fat mail. Please help! Can anyone confirm they've got the "Slide" client to work first time on download? I am sure I am experiencing an anomaly, but don't think it's a configuration issue with my WedDav server as other clients (eg Cadaver) can "PUT" fine to the server. Thanks, Portia Client output: ============== [145.246.92.181] /Temp/portia/ $ put bob.txt [SMURF] let's do a PUT! [SMURF] src = bob.txt [SMURF] dest = /Temp/portia/bob.txt src = bob.txt Uploading 'bob.txt' to '/Temp/portia/bob.txt': [SMURF] C: \apps\jakarta-slide-1.0.16\src\webdav\client\src\bob.txt [SMURF] READING FILE CONTENTS: We love Methode! [SMURF] WebdavResource.putMethod() start [SMURF] READING FILE CONTENTS: We love Methode! [SMURF] HttpClient.executeMethod() start. [SMURF] HttpClient.executeMethod() now sending request body allegedly. [SMURF} streaming data out from HttpClient... [SMURF] FILE is being set to: bob.txt [SMURF] pumping out code as UTF-16 [SMURF] stream query file contents = We love Methode! [SMURF} streaming data out from HttpClient DONE. [SMURF] input var = java.net.SocketInputStream@ab23 [SMURF] HTTP/1.1 204 No Content [SMURF] Date: Fri, 21 Feb 2003 16:52:57 GMT [SMURF] Date: Fri, 21 Feb 2003 16:52:57 GMT [SMURF] Content-Language: en [SMURF] Server: Apache Tomcat/4.0.3 (HTTP/1.1 Connector) [SMURF] [SMURF] HttpClient.executeMethod() now sending request body allegedly. [SMURF} streaming data out from HttpClient... [SMURF] FILE is being set to: bob.txt [SMURF] pumping out code as UTF-16 [SMURF] stream query file contents = We love Methode! [SMURF} streaming data out from HttpClient DONE. [SMURF] input var = java.net.SocketInputStream@e3b895 [SMURF] HTTP/1.1 204 No Content [SMURF] Date: Fri, 21 Feb 2003 16:53:58 GMT [SMURF] Date: Fri, 21 Feb 2003 16:53:58 GMT [SMURF] Content-Language: en [SMURF] Server: Apache Tomcat/4.0.3 (HTTP/1.1 Connector) [SMURF] Hangs... Server: ======== 2003-02-21 16:56:49,041 INFO [HttpProcessor[8080][1]] dav - (IP 145.246.232.143) PROPFIND http://145.246.92.181:8080/ 2003-02-21 16:56:49,042 DEBUG [HttpProcessor[8080][1]] dav - SessionData bound 2003-02-21 16:56:49,043 DEBUG [HttpProcessor[8080][1]] dav - login with default user: Administrator : 2003-02-21 16:56:58,683 INFO [HttpProcessor[8080][1]] dav - (IP 145.246.232.143) PROPFIND http://145.246.92.181:8080/Temp/portia/ ^[[A2003-02-21 16:57:10,263 INFO [HttpProcessor[8080][1]] dav - (IP 145.246.232.143) PUT http://145.246.92.181:8080/Temp/portia/bob.txt ********************************************************************************** This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. We may monitor email to and from our network. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
