cURL / Mailing Lists / curl-users / Single Mail


Specifying an exact http header

From: Kelv <>
Date: Wed, 28 Nov 2001 19:50:58 +0000 (GMT)

Hi list folks,

Using Curl I need to be able to specify the following headers when
communicating via HTTPS, but am having problems which I will go into later.

This goes via SSL to port 7443 (not real address)

POST /GatewayDC HTTP/1.0
Referer: mycompanyname
Accept: image/gif, image/jpeg, image/pjpeg, text/plain, text/html, */*
Content-Type: image/gif
Content-length: %d

transaction the length of which is %d

The only straightforward way I have found of doing this is using
Curl, but I can't get it to work as the server is unhappy with the
requests I submit. I put -v in to show the headers I am sending and they
are incorrect, but I don't know how to correct them in Curl.
The first problem is the POST line. When I view Curls verbose output it
shows POST / HTTP/1.1 instead of POST /GatewayDC HTTP/1.0
Secondly Curl is adding User-Agent: and Pragma: information which I don't
want sent.
Apart from that the output appears ok. If you were going to want to send
exactly the headers shown above using Curl, how would you do it?
I've been stuck on this for several days, so any help would be greatly
kelv at kelv dot net
Received on 2001-11-28