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

Transfer-encoding header is case sensitive #125

Open
jlemaes opened this issue Apr 13, 2021 · 0 comments
Open

Transfer-encoding header is case sensitive #125

jlemaes opened this issue Apr 13, 2021 · 0 comments

Comments

@jlemaes
Copy link

jlemaes commented Apr 13, 2021

We recently had an issue with requests that contained lowercase transfer-encoding: chunked header that's not correctly parsed by meinheld 1.0.2. We get a 400 response:

$ curl 'http://localhost:9000/' --header 'transfer-encoding: chunked' --data '' 
<html><head><title>Bad Request</title></head><body><p>Bad Request.</p></body></html>%  

while the uppercase header does get to the application:

$ curl 'http://localhost:9000/' --header 'Transfer-Encoding: chunked' --data ''
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>405 Method Not Allowed</title>
<h1>Method Not Allowed</h1>
<p>The method is not allowed for the requested URL.</p>

Checking the commits this seems to be the cause: 4155876.
Meinheld 1.0.1 did indeed parse both transfer-encoding: chunked and 'Transfer-Encoding: chunked' according to the rfc

Field names are case-insensitive.

Can this commit get reverted? I can create a PR if needed.

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

No branches or pull requests

1 participant