-
Notifications
You must be signed in to change notification settings - Fork 1k
python-ecosys/aiohttp: fix header - case-insensitivity #972
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
python-ecosys/aiohttp: fix header - case-insensitivity #972
Conversation
The pipeline is failing for an unrelated reason (version of GHA upload artifact) |
e5fffb6
to
6dddab7
Compare
Thanks for the fix. This is necessary as you point out, to comply with HTTP spec. However I have some suggestions (inline) to optimise it for MicroPython. |
1610ec7
to
60e6188
Compare
@dpgeorge thanks for the proposed changes. I implemented those and tested those successfully. |
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.
Great, thanks for updating!
According to RFC https://datatracker.ietf.org/doc/html/rfc7230#section-3.2 header names are case-insensitive. This commit makes sure that the module behaves consistently regardless of the casing of "Content-type" and "Content-Length" (other headers are not considered by the module). Without this fix, the client seems to wait for the connection termination (~10 seconds) prior to returning any content if the casing of "Content-Length" is different. Signed-off-by: FuNK3Y <[email protected]>
60e6188
to
86df723
Compare
@dpgeorge This should have generated a new version of the module - right? It shows here that the version increased:
Here is what I get when I try to install the package:
There seems to be nothing above https://micropython.org/pi/v2/package/6/aiohttp/0.0.3.json |
According to RFC (https://datatracker.ietf.org/doc/html/rfc7230#section-3.2) header names are case-insensitive.
This PR makes sure that the module behaves consistently regardless of the casing of
Content-type
andContent-Length
(other headers are not considered by the module)Without this fix, the client seems to wait for the connection termination (~10 seconds) prior to returning any content if the casing of
Content-Length
is different.