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

Bugfix/4822 #4823

Merged
merged 8 commits into from May 17, 2021
Merged

Bugfix/4822 #4823

merged 8 commits into from May 17, 2021

Conversation

RaasAhsan
Copy link
Member

Fixes #4822 . The issue is that AB operates on HTTP/1.0 and the absence of a connection header on HTTP/1.0 implies that the client wishes the connection to be terminated after the response is written

def hasConnection(expected: String): Boolean =
headers.exists {
case Header.Raw(name, value) =>
name == connectionCi && value.toLowerCase.contains(expected)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should always use a Locale on toLowerCase. Most people use Locale.US, but I use Locale.ROOT.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will generate false positives if keep-alive or close are substrings of a different token, but I suppose those people are just asking for trouble.

@rossabaker rossabaker added this to the 0.21.23 milestone May 15, 2021
@rossabaker rossabaker merged commit 6a0490d into http4s:series/0.21 May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants