-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
Add CONNECT constant to HttpMethod #34195
base: main
Are you sure you want to change the base?
Add CONNECT constant to HttpMethod #34195
Conversation
Replaced outdated references to HTTP 1.1 section links (RFC 2616) with updated references to RFC 9110. The original document has been superseded.
Introduced a new constant CONNECT with reference to RFC 9110. Updated values array and valueOf method.
Modified the values test in HttpMethodTests to include the CONNECT method.
The CONNECT method is not supported by HttpComponentsClientHttpConnector and JdkClientHttpConnector.
The CONNECT http method is primarily used for establishing tunnels and is not relevant for RequestMethod.
Updated initAllowedHttpMethods in WebContentGenerator and RequestMappingInfoHandlerMapping to explicitly exclude the CONNECT method.
Please revert, this is unrelated to your proposal of adding |
This reverts commit 5489d56 as it is unrelated to the addition of CONNECT to HttpMethod.
822c6cf
to
9a1a181
Compare
Hello @snicoll ! Done: the commit with link updates has been reverted as requested.
|
Let's see where this PR leads us and we can revisit the other change. The rule (not sure where that comes from) is irrelevant as your commits are going to be squashed if we merge this. |
@snicoll
|
While reviewing issue #34044, I noticed that the HttpMethod class does not include a constant for the HTTP method CONNECT, which was introduced in RFC 7231. This PR adds the CONNECT constant to the HttpMethod class and updates the test class HttpMethodTests.
Changes in other files:
CONNECT method excluded in initAllowedHttpMethods of RequestMappingInfoHandlerMapping and in initAllowHeader of WebContentGenerator.
CONNECT method is not supported by HttpComponentsClientHttpConnector and JdkClientHttpConnector, so ClientHttpConnectorTests was updated to dynamically skip CONNECT for these connectors.
CONNECT method is primarily used for establishing tunnels, so it is not relevant for RequestMethod class and was excluded from RequestMethodTests.
These changes prepare the repository for a follow-up PR addressing issue #34044, where a conditional check will be introduced for WebSocket handshakes: if the HTTP version is HTTP/2 the method must be CONNECT, as specified in RFC 8441, otherwise it should be GET.