cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: MIME headers

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Mon, 2 Feb 2004 16:20:00 +0100 (CET)

On Mon, 2 Feb 2004, kris wrote:

> Here is my output. I just have one -H "{headers}" with \n between each
> header I want. Is this right or do I need a -H "{header}" for each header
> to be sent?

The latter. Also note that 'POST' is not a header, it is the actual request
keyword, and you change that with -X. If you want to post to '/AUTHORIZE',
then use that in the URL. If you really need HTTP 1.0, then use -0/--http1.0
to make curl more stupid.

> /usr/local/bin/curl -m 120 -H "POST /AUTHORIZE HTTP/1.0
> MIME-Version: 1.0
> Content-type: application/PTI21
> Content-length: 1278
> Content-transfer-encoding: text
> Request-number: 1
> Document-type: Request

Also, try not to replace the Content-length: header, it will only cause you
problems (when you set it wrong by one byte or so). Let curl add its own
version of that header with the calculated size of the data.

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
   [[ Do not send mails to this email address. They won't reach me. ]]
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
Received on 2004-02-02