socketry / protocol-http

MIT License
23 stars 20 forks source link

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

Closed zarqman closed 9 months ago

zarqman commented 1 year ago

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

Contribution

ioquatix commented 9 months ago

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