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
Bugfix/4822 #4823
Conversation
def hasConnection(expected: String): Boolean = | ||
headers.exists { | ||
case Header.Raw(name, value) => | ||
name == connectionCi && value.toLowerCase.contains(expected) |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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.
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