Skip to content

Do not send keep-alive in 101 (Switching Protocols) responses#709

Closed
rousskov wants to merge 1 commit intosquid-cache:masterfrom
measurement-factory:TDL-upgrade-keep-alive
Closed

Do not send keep-alive in 101 (Switching Protocols) responses#709
rousskov wants to merge 1 commit intosquid-cache:masterfrom
measurement-factory:TDL-upgrade-keep-alive

Conversation

@rousskov
Copy link
Contributor

... because it breaks clients using websocket_client[1] library and is
redundant in our HTTP/1.1 control messages anyway.

I suspect that at least some buggy clients are confused by a multi-value
Connection field rather than the redundant keep-alive signal itself, but
let's try to follow RFC 7230 Upgrade example more closely this time and
send no keep-alive at all.

[1] https://pypi.org/project/websocket_client/

... because it breaks clients using websocket_client[1] library and is
redundant in our HTTP/1.1 control messages anyway.

I suspect that at least some buggy clients are confused by a multi-value
Connection field rather than the redundant keep-alive signal itself, but
let's try to follow RFC 7230 Upgrade example more closely this time and
send no keep-alive at all.

[1] https://pypi.org/project/websocket_client/
@rousskov
Copy link
Contributor Author

Folks suffering from this incompatibility problem have confirmed that the suggested change fixes it.

@rousskov
Copy link
Contributor Author

@yadij, this PR undoes your (officially committed) suggestion so you may want to review it.

@squid-cache squid-cache deleted a comment from squidadm Aug 10, 2020
@yadij
Copy link
Contributor

yadij commented Aug 10, 2020

Folks suffering from this incompatibility problem have confirmed that the suggested change fixes it.

Do we know how those folks have been testing the patch? live traffic or lab tests?

FTR: Clients failing due to multi-value Connection fields will not be solved by this, only the amount of cases reduced.

The cases my suggestion was for were not obeying HTTP/1.1 requirements about keep-alive based on the HTTP/1.1 label anyway, so breaking them is okay now we have a real-world traffic case needing to do so.

@yadij yadij changed the title Do not send keep-alive in 101 (Switching Protocols) responses Do not send keep-alive in 101 (Switching Protocols) responses Aug 10, 2020
@yadij yadij added the M-cleared-for-merge https://github.com/measurement-factory/anubis#pull-request-labels label Aug 11, 2020
@rousskov
Copy link
Contributor Author

Do we know how those folks have been testing the patch? live traffic or lab tests?

No, I do not have direct contact with those folks. My guess is that they are using live traffic at this point.

squid-anubis pushed a commit that referenced this pull request Aug 12, 2020
... because it breaks clients using websocket_client[1] library and is
redundant in our HTTP/1.1 control messages anyway.

I suspect that at least some buggy clients are confused by a multi-value
Connection field rather than the redundant keep-alive signal itself, but
let's try to follow RFC 7230 Upgrade example more closely this time and
send no keep-alive at all.

[1] https://pypi.org/project/websocket_client/
@squid-anubis squid-anubis added the M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels label Aug 12, 2020
@squid-anubis squid-anubis added M-merged https://github.com/measurement-factory/anubis#pull-request-labels and removed M-cleared-for-merge https://github.com/measurement-factory/anubis#pull-request-labels M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels labels Aug 12, 2020
yadij pushed a commit to yadij/squid that referenced this pull request Aug 17, 2020
…cache#709)

... because it breaks clients using websocket_client[1] library and is
redundant in our HTTP/1.1 control messages anyway.

I suspect that at least some buggy clients are confused by a multi-value
Connection field rather than the redundant keep-alive signal itself, but
let's try to follow RFC 7230 Upgrade example more closely this time and
send no keep-alive at all.

[1] https://pypi.org/project/websocket_client/
squidadm pushed a commit to squidadm/squid that referenced this pull request Aug 17, 2020
…cache#709)

... because it breaks clients using websocket_client[1] library and is
redundant in our HTTP/1.1 control messages anyway.

I suspect that at least some buggy clients are confused by a multi-value
Connection field rather than the redundant keep-alive signal itself, but
let's try to follow RFC 7230 Upgrade example more closely this time and
send no keep-alive at all.

[1] https://pypi.org/project/websocket_client/
yadij pushed a commit that referenced this pull request Aug 18, 2020
... because it breaks clients using websocket_client[1] library and is
redundant in our HTTP/1.1 control messages anyway.

I suspect that at least some buggy clients are confused by a multi-value
Connection field rather than the redundant keep-alive signal itself, but
let's try to follow RFC 7230 Upgrade example more closely this time and
send no keep-alive at all.

[1] https://pypi.org/project/websocket_client/
@rousskov
Copy link
Contributor Author

rousskov commented Sep 22, 2020

FTR: A relatively popular service, Google Voice at web.voice.telephony.goog, responds with HTTP/1.1 400 Bad Request to Squid Upgrade requests with Connection: keep-alive (and successfully establishes a websocket tunnel if it does not receive that request header). We will fix that in a separate PR #732.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

M-merged https://github.com/measurement-factory/anubis#pull-request-labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants