mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-28 05:01:28 +03:00
Add HTTP_HEAD to HTTPMethod and parse it (#6413)
* Add HTTP_HEAD to HTTPMethod * Parse the HTTP_HEAD variant of HTTPMethod from a method string * Add HTTP_HEAD to the ESP8266WebServer constants * Skip sending the content of the response if the HTTP method is HEAD method * Convert the HTTP status code 418 to string This status code is an easter egg from the IETF and is described in [RFC2324](https://tools.ietf.org/html/rfc2324#section-2.3.2)
This commit is contained in:
committed by
Earle F. Philhower, III
parent
8f45a0fb91
commit
0dbb04e881
@ -30,7 +30,7 @@
|
||||
#include <FS.h>
|
||||
#include "detail/mimetable.h"
|
||||
|
||||
enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };
|
||||
enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };
|
||||
enum HTTPUploadStatus { UPLOAD_FILE_START, UPLOAD_FILE_WRITE, UPLOAD_FILE_END,
|
||||
UPLOAD_FILE_ABORTED };
|
||||
enum HTTPClientStatus { HC_NONE, HC_WAIT_READ, HC_WAIT_CLOSE };
|
||||
@ -194,10 +194,10 @@ protected:
|
||||
std::unique_ptr<HTTPUpload> _currentUpload;
|
||||
int _postArgsLen;
|
||||
RequestArgument* _postArgs;
|
||||
|
||||
|
||||
int _headerKeysCount;
|
||||
RequestArgument* _currentHeaders;
|
||||
|
||||
|
||||
size_t _contentLength;
|
||||
String _responseHeaders;
|
||||
|
||||
|
Reference in New Issue
Block a user