-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Bugfix/http client #2867
Bugfix/http client #2867
Conversation
Updated the reuse logic to be in line with the ESP8266. |
… in connect() in case _client was set null
Do not merge this PR yet. It has an unsolved problem that I am tracking on the same PR for the ESP8266 |
@Jeroen88 make sure you ping me on gitter once this is OK for merge :) I might miss it here |
@me-no-dev Sure, I will :) However, I have the same PR for ESP8266 (see here), and I think there are still reuse issues. I think so by looking at the code. However, I miss the protocol knowledge to be sure, nor do I have defined test cases (send request header Connection: Keep-Alive, get response header Connection: Close, I think ::disconnect() should be called, and ::connect() on the next POST, but is that true?; Is it possible that a connection is reset during a Keep-Alive situation and should it be handled by HTTPClient?). |
@me-no-dev the HTTPClient library is in line with the ESP8266HTTPClient library, as far as reusing the connection is concerned. I tested the changes on the ESP8266. Also I ran the ESP32 code to test HTTP/1.0 and HTTP/1.1, both with ::setReuse(false) and ::setReuse(true). Everything seems to be fine now... |
Made a mistake in parsing the header for HTTP1.0 in #6152. This PR corrects this.