Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove proxy-connection header from outgoing HTTP/2 messages #2138

Merged
merged 1 commit into from
Mar 10, 2022

Conversation

idelpivnitskiy
Copy link
Member

@idelpivnitskiy idelpivnitskiy commented Mar 10, 2022

Motivation:

Quote from the spec
(https://datatracker.ietf.org/doc/html/rfc7540#section-8.1.2.2):

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 the
Connection header field.

H2ToStH1Utils.h1HeadersToH2Headers() removes all described headers
except proxy-connection.

Modifications:

  • Remove proxy-connection header from the outgoing HTTP/2 messages;
  • Test that HTTP/2 client and server remove prohibited headers;

Result:

Outgoing HTTP/2 messages never contain prohibited proxy-connection
header.

Motivation:

Quote from the spec
(https://datatracker.ietf.org/doc/html/rfc7540#section-8.1.2.2):

   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 the
   Connection header field.

`H2ToStH1Utils.h1HeadersToH2Headers()` removes all described headers
except `proxy-connection`.

Modifications:

- Remove `proxy-connection` header from the outgoing HTTP/2 messages;
- Test that HTTP/2 client and server remove prohibited headers;

Result:

Outgoing HTTP/2 messages never contain prohibited `proxy-connection`
header.
@idelpivnitskiy idelpivnitskiy self-assigned this Mar 10, 2022
@idelpivnitskiy idelpivnitskiy merged commit dd94aea into apple:main Mar 10, 2022
@idelpivnitskiy idelpivnitskiy deleted the proxy-connection branch March 10, 2022 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants