Skip to content

Commit 4eeee1c

Browse files
author
Andreas Horn
committedMar 10, 2024
improves readability of comments
1 parent c96dc26 commit 4eeee1c

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed
 

‎libraries/ESP8266WebServer/src/ESP8266WebServer.h

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ enum HTTPAuthMethod { BASIC_AUTH, DIGEST_AUTH };
5858
#define HTTP_UPLOAD_BUFLEN 2048
5959
#endif
6060

61-
#define HTTP_MAX_DATA_WAIT 5000 //ms to wait for the client to send the request
62-
#define HTTP_MAX_DATA_AVAILABLE_WAIT 30 //ms to wait for the client to send the request when there is another client with data available
63-
#define HTTP_MAX_POST_WAIT 5000 //ms to wait for POST data to arrive
64-
#define HTTP_MAX_SEND_WAIT 5000 //ms to wait for data chunk to be ACKed
65-
#define HTTP_MAX_CLOSE_WAIT 2000 //ms to wait for the client to close the connection
61+
#define HTTP_MAX_DATA_WAIT 5000 // ms to wait for the client to send the request
62+
#define HTTP_MAX_DATA_AVAILABLE_WAIT 30 // ms to wait for the client to send the request when there is another client with data available
63+
#define HTTP_MAX_POST_WAIT 5000 // ms to wait for POST data to arrive
64+
#define HTTP_MAX_SEND_WAIT 5000 // ms to wait for data chunk to be ACKed
65+
#define HTTP_MAX_CLOSE_WAIT 2000 // ms to wait for the client to close the connection
6666

6767
#define CONTENT_LENGTH_UNKNOWN ((size_t) -1)
6868
#define CONTENT_LENGTH_NOT_SET ((size_t) -2)
@@ -72,9 +72,9 @@ typedef struct {
7272
String filename;
7373
String name;
7474
String type;
75-
size_t totalSize; // total size of uploaded file so far
76-
size_t currentSize; // size of data currently in buf
77-
size_t contentLength; // size of entire post request, file size + headers and other request data.
75+
size_t totalSize; // total size of uploaded file so far
76+
size_t currentSize; // size of data currently in buf
77+
size_t contentLength; // size of entire post request, file size + headers and other request data.
7878
uint8_t buf[HTTP_UPLOAD_BUFLEN];
7979
} HTTPUpload;
8080

@@ -122,8 +122,8 @@ class ESP8266WebServerTemplate
122122
void on(const Uri &uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn);
123123
void addHandler(RequestHandlerType* handler);
124124
void serveStatic(const char* uri, fs::FS& fs, const char* path, const char* cache_header = NULL );
125-
void onNotFound(THandlerFunction fn); //called when handler is not assigned
126-
void onFileUpload(THandlerFunction fn); //handle file uploads
125+
void onNotFound(THandlerFunction fn); // called when handler is not assigned
126+
void onFileUpload(THandlerFunction fn); // handle file uploads
127127
void enableCORS(bool enable);
128128
void enableETag(bool enable, ETagFunction fn = nullptr);
129129

@@ -135,21 +135,21 @@ class ESP8266WebServerTemplate
135135
// Allows setting server options (i.e. SSL keys) by the instantiator
136136
ServerType &getServer() { return _server; }
137137

138-
const String& pathArg(unsigned int i) const; // get request path argument by number
138+
const String& pathArg(unsigned int i) const; // get request path argument by number
139139
const String& arg(const String& name) const; // get request argument value by name
140-
const String& arg(int i) const; // get request argument value by number
141-
const String& argName(int i) const; // get request argument name by number
142-
int args() const; // get arguments count
143-
bool hasArg(const String& name) const; // check if argument exists
140+
const String& arg(int i) const; // get request argument value by number
141+
const String& argName(int i) const; // get request argument name by number
142+
int args() const; // get arguments count
143+
bool hasArg(const String& name) const; // check if argument exists
144144
void collectHeaders(const char* headerKeys[], const size_t headerKeysCount); // set the request headers to collect
145145
template<typename... Args>
146-
void collectHeaders(const Args&... args); // set the request headers to collect (variadic template version)
146+
void collectHeaders(const Args&... args); // set the request headers to collect (variadic template version)
147147
const String& header(const String& name) const; // get request header value by name
148-
const String& header(int i) const; // get request header value by number
149-
const String& headerName(int i) const; // get request header name by number
150-
int headers() const; // get header count
148+
const String& header(int i) const; // get request header value by number
149+
const String& headerName(int i) const; // get request header name by number
150+
int headers() const; // get header count
151151
bool hasHeader(const String& name) const; // check if header exists
152-
const String& hostHeader() const; // get request host header if available or empty String if not
152+
const String& hostHeader() const; // get request host header if available or empty String if not
153153

154154
// send response to the client
155155
// code - HTTP response code, can be 200 or 404
@@ -350,4 +350,4 @@ class ESP8266WebServerTemplate
350350
using ESP8266WebServer = esp8266webserver::ESP8266WebServerTemplate<WiFiServer>;
351351
using RequestHandler = esp8266webserver::RequestHandler<WiFiServer>;
352352

353-
#endif //ESP8266WEBSERVER_H
353+
#endif // ESP8266WEBSERVER_H

0 commit comments

Comments
 (0)