“存在BUG
git commit -m “存在BUG
This commit is contained in:
@ -4,7 +4,6 @@
|
||||
|
||||
#include "HttpClient.h"
|
||||
#include "b64.h"
|
||||
|
||||
// Initialize constants
|
||||
const char* HttpClient::kUserAgent = "Arduino/2.2.0";
|
||||
const char* HttpClient::kContentLengthPrefix = HTTP_HEADER_CONTENT_LENGTH ": ";
|
||||
@ -687,13 +686,13 @@ bool HttpClient::headerAvailable()
|
||||
{
|
||||
// clear the currently store header line
|
||||
iHeaderLine = "";
|
||||
|
||||
int i = 0;
|
||||
while (!endOfHeadersReached())
|
||||
{
|
||||
// read a byte from the header
|
||||
int c = readHeader();
|
||||
|
||||
if (c == '\r' || c == '\n')
|
||||
if (c == '\r' || c == '\n'||c==-1)
|
||||
{
|
||||
if (iHeaderLine.length())
|
||||
{
|
||||
@ -709,6 +708,8 @@ bool HttpClient::headerAvailable()
|
||||
|
||||
// append byte to header line
|
||||
iHeaderLine += (char)c;
|
||||
i++;
|
||||
if(i>20000) return true;
|
||||
}
|
||||
|
||||
return (iHeaderLine.length() > 0);
|
||||
|
Reference in New Issue
Block a user