Skip to content

Commit 1020c42

Browse files
committed
Merge branch 'master' into patch-1
2 parents 8b9f78e + 234a874 commit 1020c42

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
class TransportTraits
3434
{
3535
public:
36+
virtual ~TransportTraits()
37+
{
38+
}
39+
3640
virtual std::unique_ptr<WiFiClient> create()
3741
{
3842
return std::unique_ptr<WiFiClient>(new WiFiClient());
@@ -624,6 +628,13 @@ int HTTPClient::writeToStream(Stream * stream)
624628
break;
625629
}
626630

631+
// read trailing \r\n at the end of the chunk
632+
char buf[2];
633+
auto trailing_seq_len = _tcp->readBytes((uint8_t*)buf, 2);
634+
if (trailing_seq_len != 2 || buf[0] != '\r' || buf[1] != '\n') {
635+
return returnError(HTTPC_ERROR_READ_TIMEOUT);
636+
}
637+
627638
delay(0);
628639
}
629640
} else {

libraries/ESP8266WiFi/src/include/UdpContext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ class UdpContext
213213
return size;
214214
}
215215

216-
char peek()
216+
int peek()
217217
{
218218
if (!_rx_buf || _rx_buf_offset == _rx_buf->len)
219219
return -1;

tools/sdk/ld/eagle.app.v6.common.ld

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ SECTIONS
7878
*(.sdata2.*)
7979
*(.gnu.linkonce.s2.*)
8080
*(.jcr)
81+
. = ALIGN(4);
82+
_Pri_3_HandlerAddress = ABSOLUTE(.);
8183
_data_end = ABSOLUTE(.);
8284
} >dram0_0_seg :dram0_0_phdr
8385

0 commit comments

Comments
 (0)