From c19c15dd07f7943100cb809c0c3d599b37944980 Mon Sep 17 00:00:00 2001 From: anschrammh Date: Sun, 17 Nov 2019 10:58:43 +0100 Subject: [PATCH] Added a new range attribut in order to handle the http bytes-range command (to be done) --- src/app/WEBClient.cpp | 2 +- src/app/WEBClient.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/WEBClient.cpp b/src/app/WEBClient.cpp index 24ddaee..13df51a 100644 --- a/src/app/WEBClient.cpp +++ b/src/app/WEBClient.cpp @@ -2,7 +2,7 @@ //#define DEBUG_WEBCL -WEBClient::WEBClient(WiFiClient client, uint8_t id, uint16_t maxResourceBuffer, uint16_t maxBodyBuffer, uint16_t dataBufferSize) : TCPClient(client, id, dataBufferSize), _WEBClientState(WEBServer::WEBClientState::ACCEPTED), _httpParserState(WEBServer::HttpParserStatus::HTTP_VERB), _fileSentBytes(0) +WEBClient::WEBClient(WiFiClient client, uint8_t id, uint16_t maxResourceBuffer, uint16_t maxBodyBuffer, uint16_t dataBufferSize) : TCPClient(client, id, dataBufferSize), _WEBClientState(WEBServer::WEBClientState::ACCEPTED), _httpParserState(WEBServer::HttpParserStatus::HTTP_VERB), _fileSentBytes(0), _range(0) { #ifdef DEBUG_WEBCL Serial.println("WEBClient : Standard constructor called"); diff --git a/src/app/WEBClient.h b/src/app/WEBClient.h index beff4f2..9342099 100644 --- a/src/app/WEBClient.h +++ b/src/app/WEBClient.h @@ -17,6 +17,7 @@ class WEBClient : public TCPClient WEBServer::HttpRequestData _httpRequestData; WEBServer::HttpParserStatus _httpParserState; uint64_t _fileSentBytes; + uint64_t _range; //Used to store the value of the range param for file downloading void clearHttpRequestData(); };