Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

An example of a http proxy parsing the "Connection" header?

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

HTTP/1.1 proxies MUST parse the Connection header field before a message is forwarded and, for each connection-token in this field, remove any header field(s) from the message with the same name as the connection-token.

Could somebody please give an example of a common scenario the above paragraph is referring to?

Does that have anything to do with Connection: close header?

like image 458
Wojtek Avatar asked Nov 25 '25 16:11

Wojtek


1 Answers

A good example, in HTTP/1.1, is Upgrade, to indicate that a client wishes to move from HTTP/1.1 to another protocol:

 GET http://www.example.com/hello.txt HTTP/1.1
 Connection: upgrade
 Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11

If this were a proxy, the Upgrade header should not be passed to any upstream servers, as it only makes sense for this connection.

The Keep-Alive header could also appear here in HTTP/1.0 but is now obsolete with HTTP/1.1.

like image 189
Joe Avatar answered Nov 27 '25 10:11

Joe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!