Mailing Lists
cURL Mailing List Monthly Index Single Mail
curl-tracker Archives
[curl:bugs] #1491 Host-Header should be sent first
From: Daniel Stenberg <bagder_at_users.sf.net>
Date: Mon, 09 Mar 2015 14:15:12 +0000
- **labels**: --> http
Thanks! We should fix this.
--- ** [bugs:#1491] Host-Header should be sent first** **Status:** open-confirmed **Labels:** http **Created:** Mon Mar 09, 2015 02:05 PM UTC by rainer canavan **Last Updated:** Mon Mar 09, 2015 02:05 PM UTC **Owner:** Daniel Stenberg rfc7230 recommends that the Host:-header should be sent first: https://tools.ietf.org/html/rfc7230#section-5.4 Since the Host field-value is critical information for handling a request, a user agent SHOULD generate Host as the first header field following the request-line. If one explicitly sets a Host-header, curl emits such a "custom" Host:-header in the order it was set, i.e. not as the first header as recommended by rfc7230: The order is essentially the same with the curl command line tool and the PHP curl bindings. $ nc -l 1234 & [1] 50827 $ curl -vH 'X-foo: asdf' -H 'Host: asdf' http://127.0.0.1:1234/qwert * Trying 127.0.0.1... * Connected to 127.0.0.1 (127.0.0.1) port 1234 (#0) GET /qwert HTTP/1.1 User-Agent: curl/7.40.0 Accept: */* X-foo: asdf Host: asdf GET /qwert HTTP/1.1 User-Agent: curl/7.40.0 Accept: */* X-foo: asdf Host: asdf --- Sent from sourceforge.net because curl-tracker@cool.haxx.se is subscribed to https://sourceforge.net/p/curl/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/curl/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.Received on 2015-03-09 These mail archives are generated by hypermail. |