Skip to content

Commit 018fcab

Browse files
committed
Removed code to test that we're actually in a request: the original WebServer.h also simply crashes when you call the methods at the wrong time
1 parent 4a2e7c2 commit 018fcab

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/ESPWebServer.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,6 @@ String ESPWebServer::pathArg(unsigned int i) {
133133
}
134134

135135
String ESPWebServer::arg(String name) {
136-
if (!_activeRequest) {
137-
HTTPS_LOGE("arg() called but no _activeRequest");
138-
return "";
139-
}
140136
ResourceParameters *params = _activeRequest->getParams();
141137
std::string value;
142138
params->getQueryParameter(std::string(name.c_str()), value);
@@ -163,10 +159,6 @@ int ESPWebServer::args() {
163159
}
164160

165161
bool ESPWebServer::hasArg(String name) {
166-
if (!_activeRequest) {
167-
HTTPS_LOGE("hasArg() called but no _activeRequest");
168-
return false;
169-
}
170162
ResourceParameters *params = _activeRequest->getParams();
171163
bool rv = params->isQueryParameterSet(std::string(name.c_str()));
172164
HTTPS_LOGD("hasArg(%s) returns %d", name.c_str(), (int)rv);

0 commit comments

Comments
 (0)