-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Simple cookie use in ClientSession produces malformed HTTP request header in v1.2.0 #1566
Comments
i can not reproduce this problem with python 3.5.2 |
@nugget could you test with python3.4.3 + aiohttp 1.2.0 and python3.5.2 + 1.2.0 |
I have the same issue on my raspberry. But I can't update to python3.4.3 since pyton3.4.2 ist the default. But I don't see the issue on my windows developer machine with python 3.5.2. I hope that will help to find the issue. |
ok, i will back port cookies module. but it will be removed with python3.4 support around fall. |
@pvizeli could you test master? |
this issue should be fixed in master |
Looks good @fafhrd91 thanks a lot 👍 We need support for 3.4.2 while a lot of people run home-assistant on raspberry pi. |
@fafhrd91 yes please also for 3.4.2 ! |
@fafhrd91 I'm sorry I have no idea. I'm not a developer for Home Assistant. |
That's fine. In any case aiohttp will support python3.4.2 until 01/2018 |
@fafhrd91 sorry for late message. That should be okay. You make amazing work 👍 |
01/2018 is great! The Home Assistant min Python version is whatever ships with Debian. It currently is 3.4.2 but the next release of Debian called Stretch is around the corner and ships Python 3.5.3. |
aiohttp with Python 3.4.2 can send a malformed cookie header: aio-libs/aiohttp#1566 Fixes #298.
Long story short
I have client code which uses simple cookies in http requests. It works fine on aiohttp 1.1.6 machines, but not on aiohttp 1.2.0 machines.
Expected behaviour
A ClientSession is invoked with simple cookies (not CookieJar) in order to pass cookies to a server as part of the request. Here is an actual, valid request on a 1.1.6 host:
Actual behaviour
The HTTP request header produced by aiohttp 1.2.0 is malformed, erroneously including the string "Set-Cookie:". This is from a 1.2.0 host using the same client script:
Steps to reproduce
I ran
nc -l 80
on my test server so I could inspect the HTTP request being generated, then I ran this script on both versions of aiohttp:Your environment
Working host:
Non-working host:
I don't believe that the Python version difference is a factor, but I have not tested for that.
The text was updated successfully, but these errors were encountered: