Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update to ESP8266HTTPClient.cpp for no Content-Length#7691

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
earlephilhower merged 9 commits intoesp8266:masterfromdrderiv:master
Nov 20, 2020
Merged
Changes fromall commits
Commits
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
8 changes: 7 additions & 1 deletionlibraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -725,7 +725,7 @@ int HTTPClient::writeToStream(Stream * stream)
int ret = 0;

if(_transferEncoding == HTTPC_TE_IDENTITY) {
if(len > 0) {
if(len > 0 || len == -1) {
ret = writeToStreamDataBlock(stream, len);

// have we an error?
Expand DownExpand Up@@ -1184,6 +1184,12 @@ int HTTPClient::writeToStreamDataBlock(Stream * stream, int size)
if(readBytes > buff_size) {
readBytes = buff_size;
}

// len == -1 or len > what is available, read only what is available
int av = _client->available();
if (readBytes < 0 || readBytes > av) {
readBytes = av;
}

// read data
int bytesRead = _client->readBytes(buff, readBytes);
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp