Skip to content
This repository has been archived by the owner on Jan 13, 2021. It is now read-only.

Handle headers specified in the Connection header. #83

Closed
2 tasks done
Lukasa opened this issue Feb 7, 2015 · 3 comments
Closed
2 tasks done

Handle headers specified in the Connection header. #83

Lukasa opened this issue Feb 7, 2015 · 3 comments

Comments

@Lukasa
Copy link
Member

Lukasa commented Feb 7, 2015

From the spec:

HTTP/2 does not use the "Connection" header field to indicate
connection-specific header fields; in this protocol, connection-
specific metadata is conveyed by other means. An endpoint MUST NOT
generate an HTTP/2 message containing connection-specific header
fields; any message containing connection-specific header fields MUST
be treated as malformed (Section 8.1.2.6).

The only exception to this is the TE header field, which MAY be
present in an HTTP/2 request; when it is, it MUST NOT contain any
value other than "trailers".

This means that an intermediary transforming an HTTP/1.x message to
HTTP/2 will need to remove any header fields nominated by the
Connection header field, along with the Connection header field
itself. Such intermediaries SHOULD also remove other connection-
specific header fields, such as Keep-Alive, Proxy-Connection,
Transfer-Encoding and Upgrade, even if they are not nominated by
Connection.

This means there are two steps:

  • Remove the Connection header if it's passed to us. (released in v0.1.2)
  • Remove any other header specified by the Connection header. (fixed in e6c47c5)
@Lukasa
Copy link
Member Author

Lukasa commented Feb 7, 2015

Ok, step one was released in v0.1.2.

@jkbrzt
Copy link

jkbrzt commented Feb 7, 2015

@Lukasa I wonder if you could remove Connection from the Requests' request headers as well. Otherwise it appears in HTTPie's output when the request headers are printed out.

@Lukasa
Copy link
Member Author

Lukasa commented Feb 21, 2015

Ok, the full set of work here is done, excepting the work tracked under httpie/httpie-http2#3.

@Lukasa Lukasa closed this as completed Feb 21, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants