-
Notifications
You must be signed in to change notification settings - Fork 40
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
Don't use raw reads for gzipped or chunked encoding (fixes #28, #36) #37
base: master
Are you sure you want to change the base?
Don't use raw reads for gzipped or chunked encoding (fixes #28, #36) #37
Conversation
Alternatively get rid of the short read functionality altogether. Who knows what other issues with it haven't been discovered yet. |
That sounds like a problem that should be solved by writing socket-level test cases that can cover chunked and gzipped encodings, as well as a test case to ensure that all messages are processed in a timely manner. In any case, if the functionality is removed, #8 and #9 will need to be reopened. In the interim, if no one is able to write test cases, perhaps an argument would be a better option? |
@mutantmonkey do you see any issues with this change as written? Or do you have a competing fix waiting in the wings as mentioned at #36? I don't have a strong preference either way, but want to avoid letting the issue lurk for longer than necessary. |
I have a fix that I believe will work waiting at https://github.com/mutantmonkey/sseclient/tree/use_urllib3_decode, but I haven't had a chance to set up a SSE server that uses chunked encoding to confirm that it will work. |
@mutantmonkey Have you had a chance to work on it so far? |
@TheSandDoctor I have not; the situation is unchanged right now. I have a fix that I believe will work but I need way to reproduce the issue to confirm this. Right now, I do not have a server configured in this way, but if someone is able to provide a URL to an SSE endpoint that exhibits the issue, I can run a quick test. |
See issues no. #28, #36. The short read functionality breaks, because it accesses the raw stream directly. This patch disables it if gzipped or chunked encoding is used.