@@ -21,55 +21,55 @@ class FunctionRequestHandler : public RequestHandler {
21
21
delete _uri;
22
22
}
23
23
24
- bool canHandle (HTTPMethod requestMethod, const String& requestUri) override {
24
+ bool canHandle (HTTPMethod requestMethod, const String & requestUri) override {
25
25
if (_method != HTTP_ANY && _method != requestMethod) {
26
26
return false ;
27
27
}
28
28
29
29
return _uri->canHandle (requestUri, pathArgs);
30
30
}
31
31
32
- bool canUpload (const String& requestUri) override {
32
+ bool canUpload (const String & requestUri) override {
33
33
if (!_ufn || !canHandle (HTTP_POST, requestUri)) {
34
34
return false ;
35
35
}
36
36
37
37
return true ;
38
38
}
39
39
40
- bool canRaw (const String& requestUri) override {
40
+ bool canRaw (const String & requestUri) override {
41
41
if (!_ufn || _method == HTTP_GET) {
42
42
return false ;
43
43
}
44
44
45
45
return true ;
46
46
}
47
47
48
- bool canHandle (WebServer &server, HTTPMethod requestMethod, const String& requestUri) override {
48
+ bool canHandle (WebServer &server, HTTPMethod requestMethod, const String & requestUri) override {
49
49
if (_method != HTTP_ANY && _method != requestMethod) {
50
50
return false ;
51
51
}
52
52
53
53
return _uri->canHandle (requestUri, pathArgs) && (_filter != NULL ? _filter (server) : true );
54
54
}
55
55
56
- bool canUpload (WebServer &server, const String& requestUri) override {
56
+ bool canUpload (WebServer &server, const String & requestUri) override {
57
57
if (!_ufn || !canHandle (server, HTTP_POST, requestUri)) {
58
58
return false ;
59
59
}
60
60
61
61
return true ;
62
62
}
63
63
64
- bool canRaw (WebServer &server, const String& requestUri) override {
64
+ bool canRaw (WebServer &server, const String & requestUri) override {
65
65
if (!_ufn || _method == HTTP_GET || (_filter != NULL ? _filter (server) == false : false )) {
66
66
return false ;
67
67
}
68
68
69
69
return true ;
70
70
}
71
71
72
- bool handle (WebServer &server, HTTPMethod requestMethod, const String& requestUri) override {
72
+ bool handle (WebServer &server, HTTPMethod requestMethod, const String & requestUri) override {
73
73
if (!canHandle (server, requestMethod, requestUri)) {
74
74
return false ;
75
75
}
@@ -78,14 +78,14 @@ class FunctionRequestHandler : public RequestHandler {
78
78
return true ;
79
79
}
80
80
81
- void upload (WebServer &server, const String& requestUri, HTTPUpload &upload) override {
81
+ void upload (WebServer &server, const String & requestUri, HTTPUpload &upload) override {
82
82
(void )upload;
83
83
if (canUpload (server, requestUri)) {
84
84
_ufn ();
85
85
}
86
86
}
87
87
88
- void raw (WebServer &server, const String& requestUri, HTTPRaw &raw) override {
88
+ void raw (WebServer &server, const String & requestUri, HTTPRaw &raw) override {
89
89
(void )raw;
90
90
if (canRaw (server, requestUri)) {
91
91
_ufn ();
@@ -118,7 +118,7 @@ class StaticRequestHandler : public RequestHandler {
118
118
_baseUriLength = _uri.length ();
119
119
}
120
120
121
- bool canHandle (HTTPMethod requestMethod, const String& requestUri) override {
121
+ bool canHandle (HTTPMethod requestMethod, const String & requestUri) override {
122
122
if (requestMethod != HTTP_GET) {
123
123
return false ;
124
124
}
@@ -130,7 +130,7 @@ class StaticRequestHandler : public RequestHandler {
130
130
return true ;
131
131
}
132
132
133
- bool canHandle (WebServer &server, HTTPMethod requestMethod, const String& requestUri) override {
133
+ bool canHandle (WebServer &server, HTTPMethod requestMethod, const String & requestUri) override {
134
134
if (requestMethod != HTTP_GET) {
135
135
return false ;
136
136
}
@@ -146,7 +146,7 @@ class StaticRequestHandler : public RequestHandler {
146
146
return true ;
147
147
}
148
148
149
- bool handle (WebServer &server, HTTPMethod requestMethod, const String& requestUri) override {
149
+ bool handle (WebServer &server, HTTPMethod requestMethod, const String & requestUri) override {
150
150
if (!canHandle (server, requestMethod, requestUri)) {
151
151
return false ;
152
152
}
0 commit comments