1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-16 11:21:18 +03:00

Host header support

This commit is contained in:
aalku
2015-08-14 22:30:15 +02:00
committed by Ivan Grokhotkov
parent acc34e2914
commit 5a91c66615
3 changed files with 43 additions and 1 deletions

View File

@ -80,6 +80,8 @@ public:
int args(); // get arguments count
bool hasArg(const char* name); // check if argument exists
String hostHeader(); // get request host header if available or empty String if not
// send response to the client
// code - HTTP response code, can be 200 or 404
// content_type - HTTP content type, like "text/plain" or "image/png"
@ -134,6 +136,8 @@ protected:
size_t _contentLength;
String _responseHeaders;
String _hostHeader;
RequestHandler* _firstHandler;
RequestHandler* _lastHandler;
THandlerFunction _notFoundHandler;