From 847b350f82c2e29efe157ed7aa118f6d80d11ae0 Mon Sep 17 00:00:00 2001 From: anschrammh Date: Tue, 5 Apr 2022 21:00:50 +0200 Subject: [PATCH] Updated the HttpClient class due to changes to the httpVersionToString and httpMIMETypeToString methods --- src/app/HttpClient.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app/HttpClient.cpp b/src/app/HttpClient.cpp index 31bf450..b56438f 100644 --- a/src/app/HttpClient.cpp +++ b/src/app/HttpClient.cpp @@ -356,17 +356,16 @@ void HttpClient::keepAlive(boolean enabled) void HttpClient::sendHeader(HttpMIMEType contentType, uint64_t contentLength, Dictionary *headerData, HttpVersion httpVersion) { - char mime[255] = "", httpVer[15] = ""; //Host could be an IP address or a host name if(_isIp) - printf(" %s\r\nHost: %u.%u.%u.%u:%u\r\nConnection: %s\r\n", httpVersionToString(httpVersion, httpVer), remoteIP()[0], remoteIP()[1], remoteIP()[2], remoteIP()[3], remotePort(), _keepAlive ? "keep-alive" : "close"); + printf(" %s\r\nHost: %u.%u.%u.%u:%u\r\nConnection: %s\r\n", httpVersionToString(httpVersion), remoteIP()[0], remoteIP()[1], remoteIP()[2], remoteIP()[3], remotePort(), _keepAlive ? "keep-alive" : "close"); else - printf(" %s\r\nHost: %s\r\nConnection: %s\r\n", httpVersionToString(httpVersion, httpVer), _pAddress, _keepAlive ? "keep-alive" : "close"); + printf(" %s\r\nHost: %s\r\nConnection: %s\r\n", httpVersionToString(httpVersion), _pAddress, _keepAlive ? "keep-alive" : "close"); if(contentLength > 0) { printf("Content-Length: %llu\r\n", contentLength); - printf("Content-Type: %s\r\n", httpMIMETypeToString(contentType, mime)); + printf("Content-Type: %s\r\n", httpMIMETypeToString(contentType)); } //We send the headerData if not NULL