Skip to content

Bugfix/esp8266 http client #6176

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

Merged
merged 29 commits into from
Aug 26, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
9600f3e
Got tools/mklittlefs/mklittlefs after submodule update --init
Jun 2, 2019
b42f5a4
Solve HTTP1.1 persistance issue #6152
Jun 2, 2019
2bc8695
Merge branch 'master' into bugfix/ESP8266HTTPClient
Jun 5, 2019
8fc039d
fix checking the header
Jun 6, 2019
d532476
Merge branch 'master' of https://github.com/esp8266/Arduino
Jun 6, 2019
6cc3c60
Merge branch 'master' into bugfix/ESP8266HTTPClient
Jun 6, 2019
f382aa6
Let reuse connection depend on protocol used: HTTP1.0 or HTTP1.1
Jun 6, 2019
ed06407
Merge branch 'master' into bugfix/ESP8266HTTPClient
Jun 6, 2019
d45fe30
Merge branch 'master' of https://github.com/esp8266/Arduino
Jun 7, 2019
cd7d7d5
Merge branch 'master' into bugfix/ESP8266HTTPClient
Jun 7, 2019
9bd99ca
Merge remote-tracking branch 'origin/bugfix/ESP8266HTTPClient' into b…
Jun 7, 2019
51dd084
Removed tools/mklittlefs/mklittlefs
Jun 7, 2019
9ea6c69
Merge branch 'master' into bugfix/ESP8266HTTPClient
Jun 19, 2019
9fb5c4c
Merge branch 'master' of https://github.com/esp8266/Arduino
Jul 6, 2019
952c9b7
Merge branch 'master' into bugfix/ESP8266HTTPClient
Jul 6, 2019
7dba2f4
Fixed reuse, added null ptr checks
Jul 6, 2019
cf4a476
Merge branch 'bugfix/ESP8266HTTPClient' of https://github.com/Jeroen8…
Jul 6, 2019
b3a36b4
Removed space to pass Travis tests
Jul 6, 2019
37b62a4
Merge branch 'master' of https://github.com/esp8266/Arduino
Aug 4, 2019
910f033
Merge branch 'master' into bugfix/ESP8266HTTPClient
Aug 4, 2019
a558240
Fix bug reusing connection. ::handleHeaderResponse() did not clear _p…
Aug 4, 2019
1d13fec
Merge branch 'master' of https://github.com/esp8266/Arduino
Aug 5, 2019
afc51c5
Merge branch 'master' into bugfix/ESP8266HTTPClient
Aug 5, 2019
0e3c92f
Varios changes
Aug 5, 2019
293c68c
Restore ::disconnect() default parameter to false
Aug 6, 2019
96ecd06
Merge branch 'master' of https://github.com/esp8266/Arduino
Aug 7, 2019
84ef3d3
Merge branch 'master' into bugfix/ESP8266HTTPClient
Aug 7, 2019
82affca
Add return false in case of oom
Aug 7, 2019
aeb8f3e
Merge branch 'master' into bugfix/ESP8266HTTPClient
d-a-v Aug 26, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,8 @@ int HTTPClient::handleHeaderResponse()
return HTTPC_ERROR_NOT_CONNECTED;
}

_canReuse = !_useHTTP10;

String transferEncoding;
_returnCode = -1;
_size = -1;
Expand All @@ -1266,6 +1268,7 @@ int HTTPClient::handleHeaderResponse()

if(headerLine.startsWith("HTTP/1.")) {
_returnCode = headerLine.substring(9, headerLine.indexOf(' ', 9)).toInt();
_canReuse = (_returnCode != '0');
} else if(headerLine.indexOf(':')) {
String headerName = headerLine.substring(0, headerLine.indexOf(':'));
String headerValue = headerLine.substring(headerLine.indexOf(':') + 1);
Expand Down
2 changes: 1 addition & 1 deletion libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ class HTTPClient
/// request handling
String _host;
uint16_t _port = 0;
bool _reuse = false;
bool _reuse = true;
uint16_t _tcpTimeout = HTTPCLIENT_DEFAULT_TCP_TIMEOUT;
bool _useHTTP10 = false;

Expand Down
Binary file added tools/mklittlefs/mklittlefs
Binary file not shown.