cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Using curl https to Post Fixed-Length Text Data -- Unable to Get Response Data

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 20 Apr 2007 08:33:26 +0200 (CEST)

On Thu, 19 Apr 2007, Rob Moretti wrote:

> curl <https://cert.xyzcompany.com:99999> https://cert.xyzcompany.com:99999
> --cacert "certfile.txt" -k --max-time 300 -H "User-Agent:" -H "Host:" -H
> "Pragma:" -H "Accept:" -H "Content-Length:" -H "Content-Type:" -H "Expect:"
> --data-binary "@myinputfile.txt" > myoutputfile.txt

Disabling Host: and Content-Length: ? That seems... wrong.

> The -i option did cause a one-line HTTP header to be saved in
> myoutputfile.txt. The content of this file was:
>
> HTTP/1.1 200 OK

That sounds like a broken server (side script). I would expect a response to
also include a few headers, successful or not.

If I were you, I'd try harder to look like a browser when sending the request,
based on what LiveHTTPHeaders show you... Most often this kind of stuff
happens because the server tries to figure out what browser that operates on
it, and when it fails to detect one it likes it goes bananas.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-04-20