cURL / Mailing Lists / curl-users / Single Mail


HTTP-PUT fails

From: Chidanand Gangur <>
Date: Fri, 4 Jun 2004 10:52:22 +0530



I am trying to upload a file using HTTP-PUT I am trying the same
example which is given on the curl web site [httpput.c]


I am using apache 1.3.29 with mod_put as my web server and Linux RH 8.0
is my OS. When I tried running the program I find that the file is
created in the directory which I have specified but the file is empty
that is zero byte file. Why is it so ? I tried tweaking some
configuration parameters in httpd.conf but alas ...


Are there any changes required in the web server. Or any changes in the
httpd.conf I am very new to the world of http-put


This the debug output when I run my program.


*** We read 5 bytes from file

*** We read 0 bytes from file

DBG:About to connect() to


 DBG:Connected to nevis ( port 8080


 DBG:PUT /uploads/x HTTP/1.1


Pragma: no-cache

Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*





 DBG:HTTP/1.1 200 OK


 DBG:Date: Fri, 04 Jun 2004 05:12:26 GMT


 DBG:Server: Apache/1.3.29 (Unix) mod_perl/1.29 PHP/4.3.6RC3
mod_ssl/2.8.16 OpenSSL/0.9.6g


 DBG:Transfer-Encoding: chunked


 DBG:Content-Type: text/plain



<HTML>File /uploads/x created.</HTML>




 <HTML>File /uploads/x created.</HTML>

DBG:Connection #0 left intact


 DBG:Closing connection #0






Received on 2004-06-04