ws: return CURLE_WS_DENIED on refused upgrade, reuse connections#21580
Open
bradw456 wants to merge 3 commits into
Open
ws: return CURLE_WS_DENIED on refused upgrade, reuse connections#21580bradw456 wants to merge 3 commits into
bradw456 wants to merge 3 commits into
Conversation
Author
|
This replaces #20003. This approach uses an error code to indicate a WebSocket server denied an upgrade - the previous approach used an option. Since there was a lot of churn in the previous PR and the description was out of date, I've created this PR. |
bfccff8 to
3018ec0
Compare
Author
3018ec0 to
c691c58
Compare
Author
|
Hi @bagder @vszakats, just checking in on this when you have a moment. This change seems to always hit conflicts with master so its an effort to keep updating it. I'd rather not miss another feature window. I’d love to get it finalized. Is there something more I can do to get it merged? I believe CI failures are related to recent changes in master not these changes. |
When a WebSocket upgrade is refused (non-101 response), return CURLE_WS_DENIED instead of CURLE_HTTP_RETURNED_ERROR. The HTTP response is still fully processed and the connection is returned to the cache when possible. Allow WebSocket requests to reuse cached HTTP/HTTPS connections by matching compatible connections in the pool.
…tead of checking it exactly Slowness in the CI env made test 10 fail because the timeouts are tight. Change condition to make sure max_concurrent isn't exceeded, rather than match exactly. I think this matches the spirit of the happy eyeballs test.
13b52cd to
e44be34
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a WebSocket upgrade is refused (non-101 response), return CURLE_WS_DENIED instead of CURLE_HTTP_RETURNED_ERROR. The HTTP response is still fully processed and the connection is returned to the cache when possible.
Allow WebSocket requests to reuse cached HTTP/HTTPS connections by matching compatible connections in the pool.