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

Prefer 'close' over 'keep-alive' when both are present #41

Merged

Conversation

zarqman
Copy link
Contributor

@zarqman zarqman commented Sep 7, 2023

If the Connection header has both close and keep-alive, both related methods return true despite the conflicting instructions.

This PR changes keep_alive? to return false if close is simultaneously present.

Related to socketry/async-http#132

Types of Changes

  • Bug fix.

Contribution

@ioquatix ioquatix force-pushed the handle-conflicting-connection-values branch from f7761ed to d0d03ca Compare September 11, 2023 08:59
@ioquatix ioquatix force-pushed the handle-conflicting-connection-values branch from d0d03ca to 8fc0885 Compare January 26, 2024 07:54
@ioquatix
Copy link
Member

What an interesting behaviour. Apparently Chrome and Firefox interpret this differently. https://stackoverflow.com/questions/11443669/how-to-interpret-connection-keep-alive-close

@ioquatix ioquatix merged commit c5da014 into socketry:main Jan 26, 2024
14 of 22 checks passed
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