-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
5.2 beta 2 : esp_http_client bug is back (IDFGH-12032) #13097
Comments
@hmalpani Any update? |
@dannybackx |
Reproducing this is actually not very hard. I currently have a workaround in my code like this : This works for now until I get bigger results back from the server. But in this, there also lies the way to reproduce. So use a simplistic client example, and add a line liek the one above but with a ridiculously low buffer size (e.g. 25). When querying e.g. http://www.google.com I currently get (partial output from curl -v) : You should observe that with a low buffer size, these lines are not treated well by the current source, because it will break up the long lines so you get invalid (partial) content instead of the full headers. |
Hello @dannybackx |
@hmalpani |
@hmalpani v5.1 still needs fix, the backport fix is so slow. |
Hello @AxelLin |
Answers checklist.
General issue report
There used to be a bug in esp_http_client which caused it to cut headers in two if they would arrive in separate chunks. So the application would receive only piece of the actual value of a variable. It's possible to work around it by playing with buffer size, but not reliably (depends on what you get back, which happens to be one of the things an ACME server deliberately plays with).
Example of what this does to my example program :
Can be demonstrated by the "standalone" example in my acmeclient library.
See svn+ssh://dannybackx@svn.code.sf.net/p/esp32-acme-client/code or https://components.espressif.com/components/dannybackx/acmeclient .
Note that my code appears to recover from it, but that is probably not so for other applications.
See also #7157 .
The text was updated successfully, but these errors were encountered: