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

urequests: fix empty body response with some formatings #393

Closed
wants to merge 1 commit into from

Conversation

jesuslg123
Copy link

Some engines generate responses with break lines using only \n instead of \r\n, so in order to support that kind of request response body format I have also added this check. Without the fix the body response comes empty as it does not stop on the if and empty the buffer with readline()

Some engines generate responses with break lines using only \n instead of \r\n, so in order to support that kind of request response body format I have also added this check. Without the fix the body response comes empty as it does not stop on the if and empty the buffer with `readline()`
@jesuslg123 jesuslg123 changed the title Fix empty body response with some formatings urequests: fix empty body response with some formatings Jun 19, 2020
@andrewleech
Copy link
Sponsor Contributor

I'm not too sure about this, the http RFC appears to be pretty clear that \r\n is expected: https://stackoverflow.com/questions/5757290/http-header-line-break-style

I'd certainly prefer that the server gets fixed rather than patching a workaround here - do you know if this kind of issue is common?

@jesuslg123
Copy link
Author

Hi @andrewleech ,

I agree, It is a pain to need manually replace the library as the server implementation won't be updated but I have to agree with you that the implementation should follow the specs.

I will close the PR.

@jesuslg123 jesuslg123 closed this Jun 24, 2022
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.

None yet

2 participants