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

Appearance settings

Commit 60b6faa

Browse filesBrowse files
authored
fix(httpc): Fix data read was less than expected (espressif#9998)
1 parent 6debc5c commit 60b6faa
Copy full SHA for 60b6faa

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎libraries/HTTPClient/src/HTTPClient.cpp

Copy file name to clipboardExpand all lines: libraries/HTTPClient/src/HTTPClient.cpp
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@ int HTTPClient::writeToStreamDataBlock(Stream *stream, int size) {
13621362
// some time for the stream
13631363
delay(1);
13641364

1365-
int leftBytes = (readBytes - bytesWrite);
1365+
int leftBytes = (bytesRead - bytesWrite);
13661366

13671367
// retry to send the missed bytes
13681368
bytesWrite = stream->write((buff + bytesWrite), leftBytes);
@@ -1385,7 +1385,7 @@ int HTTPClient::writeToStreamDataBlock(Stream *stream, int size) {
13851385

13861386
// count bytes to read left
13871387
if (len > 0) {
1388-
len -= readBytes;
1388+
len -= bytesRead;
13891389
}
13901390

13911391
delay(0);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.