Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Skip custom Connection: headers when doing HTTP/2 #401
An application may opt to use custom Connection: headers with libcurl, but if the server supports HTTP/2 those headers are not allowed.
RFC 7540 section 22.214.171.124 states: "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"
So, to let applications keep working with HTTP/1.1 or HTTP/2, libcurl must filter out the Connection: headers for h2.