cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: 502 Proxy Error while POSTing files bigger than 65K

From: Rahul Rathi <rahul.rathi2005_at_gmail.com>
Date: Tue, 18 Aug 2009 12:33:50 +0530

Yes, i want to POST on the root of the server. Its a WORM storage device and
to write on it you have to use HTTP.

I am working with libCurl version 7.18.2.

THE POST request did not get paste correctly and did not include Host:
header. Here is the correct request.

POST http://207.200.36.91 HTTP/1.1\r\n
Host: 207.200.36.91\r\n
Pragma: no-cache\r\n
Accept: */*\r\n
Proxy-Connection: Keep-Alive\r\n
Content-Length: 80317\r\n
Content-Type: application/x-www-form-urlencoded\r\n
Expect: 100-continue\r\n
\r\n
[Content]

By the way, the URL http://207.200.36.91 which is included in the first line
immediately after POST, how can i avoid this ?

Sometimes, i want to generate a POST request like this:
POST /?alias=yes HTTP/1.1

and the file can be huge too. I tried setting CURLOPT_POSTFIELDS to
"\?alias=true". The CURLOPT_POSTFIELDSIZE was set to the size of the
file.But this did not work.

Also, for PUT request i want to achieve something like this:
PUT /41A140B5271DC8D22FF8D027176A0821 HTTP/1.1
Host: xxx.xxx.com

Thanks in advance.
Received on 2009-08-18