1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-26 07:02:15 +03:00

Added naive content length to upload struct (#5142)

Content length provides context into the size of the upload, it's not
the exact form body size it's off by the request header info, but it was
already parsed by the library and provides little to no additional
overhead to pass on for use in request handlers.
This commit is contained in:
DiamondDrake
2018-11-29 20:24:55 -05:00
committed by Earle F. Philhower, III
parent 1fb9b4e0ee
commit 8f28c88f9c
2 changed files with 3 additions and 1 deletions

View File

@ -468,6 +468,7 @@ bool ESP8266WebServer::_parseForm(WiFiClient& client, const String& boundary, ui
_currentUpload->type = argType;
_currentUpload->totalSize = 0;
_currentUpload->currentSize = 0;
_currentUpload->contentLength = len;
#ifdef DEBUG_ESP_HTTP_SERVER
DEBUG_OUTPUT.print("Start File: ");
DEBUG_OUTPUT.print(_currentUpload->filename);