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

When using urllib3 no data received. #20

Open
CutePotatoDev opened this issue Jan 2, 2020 · 3 comments
Open

When using urllib3 no data received. #20

CutePotatoDev opened this issue Jan 2, 2020 · 3 comments

Comments

@CutePotatoDev
Copy link

Python 3.6.7
urllib3 1.25.7
sseclient-py 1.7

When using with urllib3 not get my messages. looks like issue is:

for chunk in self._event_source:

It's never get chunks of data. I track down problem to this place:
https://github.com/urllib3/urllib3/blob/93e5c6a5bb12a67a89bd8b24584d64a3102b2096/src/urllib3/response.py#L543
urllib3 waiting 65536 bytes of data and only then dispatch chunk.
After overriding:
https://github.com/urllib3/urllib3/blob/93e5c6a5bb12a67a89bd8b24584d64a3102b2096/src/urllib3/response.py#L794
and decreasing amt size, messages start arriving as expected.

@bablokb
Copy link

bablokb commented Dec 30, 2022

Did you hardwire your overrides, or did you subclass urllib3? And did you test the alternative (normal requests)?

@CutePotatoDev
Copy link
Author

Did you hardwire your overrides, or did you subclass urllib3? And did you test the alternative (normal requests)?

Oh... it happens 3 years ago. I not even really remember anything from back then.
I try scan my code archive and found more info how i solve this problem back then.

@bablokb
Copy link

bablokb commented Jan 23, 2023

I solved this in my code by switching from the urllib3-package to requests-package. But your analysis was important to understand it was not a problem of my own code.

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

2 participants