@@ -39,11 +39,12 @@ enum {
3939};
4040
4141AsyncWebServerRequest::AsyncWebServerRequest (AsyncWebServer *s, AsyncClient *c)
42- : _client(c), _server(s), _handler(NULL ), _response(NULL ), _onDisconnectfn(NULL ), _temp(), _parseState(PARSE_REQ_START), _version(0 ), _method(HTTP_ANY),
43- _url(), _host(), _contentType(), _boundary(), _authorization(), _reqconntype(RCT_HTTP), _authMethod(AsyncAuthType::AUTH_NONE), _isMultipart(false ),
44- _isPlainPost(false ), _expectingContinue(false ), _contentLength(0 ), _parsedLength(0 ), _multiParseState(0 ), _boundaryPosition(0 ), _itemStartIndex(0 ),
45- _itemSize(0 ), _itemName(), _itemFilename(), _itemType(), _itemValue(), _itemBuffer(0 ), _itemBufferIndex(0 ), _itemIsFile(false ), _chunkStartIndex(0 ),
46- _chunkOffset(0 ), _chunkSize(0 ), _chunkedParseState(CHUNK_NONE), _chunkedLastChar(0 ), _tempObject(NULL ) {
42+ : _client(c), _server(s), _handler(NULL ), _response(NULL ), _onDisconnectfn(NULL ), _temp(), _parseState(PARSE_REQ_START), _version(0 ),
43+ _method(AsyncWebRequestMethod::HTTP_ANY), _url(), _host(), _contentType(), _boundary(), _authorization(), _reqconntype(RCT_HTTP),
44+ _authMethod(AsyncAuthType::AUTH_NONE), _isMultipart(false ), _isPlainPost(false ), _expectingContinue(false ), _contentLength(0 ), _parsedLength(0 ),
45+ _multiParseState(0 ), _boundaryPosition(0 ), _itemStartIndex(0 ), _itemSize(0 ), _itemName(), _itemFilename(), _itemType(), _itemValue(), _itemBuffer(0 ),
46+ _itemBufferIndex(0 ), _itemIsFile(false ), _chunkStartIndex(0 ), _chunkOffset(0 ), _chunkSize(0 ), _chunkedParseState(CHUNK_NONE), _chunkedLastChar(0 ),
47+ _tempObject(NULL ) {
4748 c->onError (
4849 [](void *r, AsyncClient *c, int8_t error) {
4950 (void )c;
@@ -314,33 +315,33 @@ bool AsyncWebServerRequest::_parseReqHead() {
314315 _temp = _temp.substring (index + 1 );
315316
316317 if (m == T_GET) {
317- _method = HTTP_GET;
318+ _method = AsyncWebRequestMethod:: HTTP_GET;
318319 } else if (m == T_POST) {
319- _method = HTTP_POST;
320+ _method = AsyncWebRequestMethod:: HTTP_POST;
320321 } else if (m == T_DELETE) {
321- _method = HTTP_DELETE;
322+ _method = AsyncWebRequestMethod:: HTTP_DELETE;
322323 } else if (m == T_PUT) {
323- _method = HTTP_PUT;
324+ _method = AsyncWebRequestMethod:: HTTP_PUT;
324325 } else if (m == T_PATCH) {
325- _method = HTTP_PATCH;
326+ _method = AsyncWebRequestMethod:: HTTP_PATCH;
326327 } else if (m == T_HEAD) {
327- _method = HTTP_HEAD;
328+ _method = AsyncWebRequestMethod:: HTTP_HEAD;
328329 } else if (m == T_OPTIONS) {
329- _method = HTTP_OPTIONS;
330+ _method = AsyncWebRequestMethod:: HTTP_OPTIONS;
330331 } else if (m == T_PROPFIND) {
331- _method = HTTP_PROPFIND;
332+ _method = AsyncWebRequestMethod:: HTTP_PROPFIND;
332333 } else if (m == T_LOCK) {
333- _method = HTTP_LOCK;
334+ _method = AsyncWebRequestMethod:: HTTP_LOCK;
334335 } else if (m == T_UNLOCK) {
335- _method = HTTP_UNLOCK;
336+ _method = AsyncWebRequestMethod:: HTTP_UNLOCK;
336337 } else if (m == T_PROPPATCH) {
337- _method = HTTP_PROPPATCH;
338+ _method = AsyncWebRequestMethod:: HTTP_PROPPATCH;
338339 } else if (m == T_MKCOL) {
339- _method = HTTP_MKCOL;
340+ _method = AsyncWebRequestMethod:: HTTP_MKCOL;
340341 } else if (m == T_MOVE) {
341- _method = HTTP_MOVE;
342+ _method = AsyncWebRequestMethod:: HTTP_MOVE;
342343 } else if (m == T_COPY) {
343- _method = HTTP_COPY;
344+ _method = AsyncWebRequestMethod:: HTTP_COPY;
344345 } else {
345346 return false ;
346347 }
@@ -1311,49 +1312,49 @@ String AsyncWebServerRequest::urlDecode(const String &text) const {
13111312}
13121313
13131314const char *AsyncWebServerRequest::methodToString () const {
1314- if (_method == HTTP_ANY) {
1315+ if (_method == AsyncWebRequestMethod:: HTTP_ANY) {
13151316 return T_ANY;
13161317 }
1317- if (_method & HTTP_GET) {
1318+ if (_method & AsyncWebRequestMethod:: HTTP_GET) {
13181319 return T_GET;
13191320 }
1320- if (_method & HTTP_POST) {
1321+ if (_method & AsyncWebRequestMethod:: HTTP_POST) {
13211322 return T_POST;
13221323 }
1323- if (_method & HTTP_DELETE) {
1324+ if (_method & AsyncWebRequestMethod:: HTTP_DELETE) {
13241325 return T_DELETE;
13251326 }
1326- if (_method & HTTP_PUT) {
1327+ if (_method & AsyncWebRequestMethod:: HTTP_PUT) {
13271328 return T_PUT;
13281329 }
1329- if (_method & HTTP_PATCH) {
1330+ if (_method & AsyncWebRequestMethod:: HTTP_PATCH) {
13301331 return T_PATCH;
13311332 }
1332- if (_method & HTTP_HEAD) {
1333+ if (_method & AsyncWebRequestMethod:: HTTP_HEAD) {
13331334 return T_HEAD;
13341335 }
1335- if (_method & HTTP_OPTIONS) {
1336+ if (_method & AsyncWebRequestMethod:: HTTP_OPTIONS) {
13361337 return T_OPTIONS;
13371338 }
1338- if (_method & HTTP_PROPFIND) {
1339+ if (_method & AsyncWebRequestMethod:: HTTP_PROPFIND) {
13391340 return T_PROPFIND;
13401341 }
1341- if (_method & HTTP_LOCK) {
1342+ if (_method & AsyncWebRequestMethod:: HTTP_LOCK) {
13421343 return T_LOCK;
13431344 }
1344- if (_method & HTTP_UNLOCK) {
1345+ if (_method & AsyncWebRequestMethod:: HTTP_UNLOCK) {
13451346 return T_UNLOCK;
13461347 }
1347- if (_method & HTTP_PROPPATCH) {
1348+ if (_method & AsyncWebRequestMethod:: HTTP_PROPPATCH) {
13481349 return T_PROPPATCH;
13491350 }
1350- if (_method & HTTP_MKCOL) {
1351+ if (_method & AsyncWebRequestMethod:: HTTP_MKCOL) {
13511352 return T_MKCOL;
13521353 }
1353- if (_method & HTTP_MOVE) {
1354+ if (_method & AsyncWebRequestMethod:: HTTP_MOVE) {
13541355 return T_MOVE;
13551356 }
1356- if (_method & HTTP_COPY) {
1357+ if (_method & AsyncWebRequestMethod:: HTTP_COPY) {
13571358 return T_COPY;
13581359 }
13591360 return T_UNKNOWN;
0 commit comments