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

Don't use raw reads for gzipped or chunked encoding (fixes #28, #36) #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Count-Count
Copy link
Contributor

@Count-Count Count-Count commented Dec 15, 2019

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.

@Count-Count
Copy link
Contributor Author

Alternatively get rid of the short read functionality altogether. Who knows what other issues with it haven't been discovered yet.

@mutantmonkey
Copy link
Contributor

mutantmonkey commented Dec 18, 2019

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?

@btubbs
Copy link
Owner

btubbs commented Feb 27, 2020

@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.

@mutantmonkey
Copy link
Contributor

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.

@TheSandDoctor
Copy link
Collaborator

@mutantmonkey Have you had a chance to work on it so far?

@TheSandDoctor
Copy link
Collaborator

@mutantmonkey ?

@mutantmonkey
Copy link
Contributor

@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.

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

Successfully merging this pull request may close these issues.

4 participants