curl-users
Re: Custom headers and HTTP 1.0
Date: Tue, 29 Aug 2000 07:55:25 +0200 (MET DST)
On Tue, 29 Aug 2000, WILSON, Nick wrote:
> Is there any option in curl to use HTTP 1.0 protocol instead of what
> appears to be the default of 1.1 ?
Curl always use HTTP 1.0. At least if you're speaking about the version
string it sends with its requests. Some of the stuff curl uses are 1.1
features, although it still uses the 1.0 protocol specifier.
> I have a site that uses a header 'Connection: Keep-alive' which is
> causing me hassles, and I've tried sending a -H 'Connection: close' to
> force it to use HTTP1.0 but it still sends me 1.1 code .... ?
You should be able to use that.
RFC 2616 section 14.10, page 116:
HTTP/1.1 defines the "close" connection option for the sender to
signal that the connection will be closed after completion of the
response. For example,
Connection: close
in either the request or the response header fields indicates that
the connection SHOULD NOT be considered `persistent' (section 8.1)
after the current request/response is complete.
-- Daniel Stenberg - http://daniel.haxx.se - +46-705-44 31 77 ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`olReceived on 2000-08-29