Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit dd02ed4

Browse files
authored
Merge pull request #42 from neardreams/master
fix for wrong http status header
2 parents 21006fb + 9333739 commit dd02ed4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/EthernetWebServer-impl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ void EthernetWebServer::_prepareHeader(String& response, int code, const char* c
418418
EWString aResponse = fromString(response);
419419

420420
aResponse = "HTTP/1." + fromString(String(_currentVersion)) + " ";
421-
aResponse += code;
421+
aResponse += String(code).c_str();
422422
aResponse += " ";
423423
aResponse += fromString(_responseCodeToString(code));
424424
aResponse += RETURN_NEWLINE;
@@ -462,7 +462,7 @@ void EthernetWebServer::_prepareHeader(String& response, int code, const char* c
462462
void EthernetWebServer::_prepareHeader(EWString& response, int code, const char* content_type, size_t contentLength)
463463
{
464464
response = "HTTP/1." + fromString(String(_currentVersion)) + " ";
465-
response += code;
465+
response += String(code).c_str();
466466
response += " ";
467467
response += fromString(_responseCodeToString(code));
468468
response += RETURN_NEWLINE;

0 commit comments

Comments
 (0)