@@ -124,7 +124,7 @@ bool WebServer::_parseRequest(NetworkClient &client) {
124
124
// attach handler
125
125
RequestHandler *handler;
126
126
for (handler = _firstHandler; handler; handler = handler->next ()) {
127
- if (handler->canHandle (_currentMethod, _currentUri)) {
127
+ if (handler->canHandle (* this , _currentMethod, _currentUri)) {
128
128
break ;
129
129
}
130
130
}
@@ -176,7 +176,7 @@ bool WebServer::_parseRequest(NetworkClient &client) {
176
176
}
177
177
}
178
178
179
- if (!isForm && _currentHandler && _currentHandler->canRaw (_currentUri)) {
179
+ if (!isForm && _currentHandler && _currentHandler->canRaw (* this , _currentUri)) {
180
180
log_v (" Parse raw" );
181
181
_currentRaw.reset (new HTTPRaw ());
182
182
_currentRaw->status = RAW_START;
@@ -334,7 +334,7 @@ void WebServer::_parseArguments(String data) {
334
334
335
335
void WebServer::_uploadWriteByte (uint8_t b) {
336
336
if (_currentUpload->currentSize == HTTP_UPLOAD_BUFLEN) {
337
- if (_currentHandler && _currentHandler->canUpload (_currentUri)) {
337
+ if (_currentHandler && _currentHandler->canUpload (* this , _currentUri)) {
338
338
_currentHandler->upload (*this , _currentUri, *_currentUpload);
339
339
}
340
340
_currentUpload->totalSize += _currentUpload->currentSize ;
@@ -449,7 +449,7 @@ bool WebServer::_parseForm(NetworkClient &client, String boundary, uint32_t len)
449
449
_currentUpload->totalSize = 0 ;
450
450
_currentUpload->currentSize = 0 ;
451
451
log_v (" Start File: %s Type: %s" , _currentUpload->filename .c_str (), _currentUpload->type .c_str ());
452
- if (_currentHandler && _currentHandler->canUpload (_currentUri)) {
452
+ if (_currentHandler && _currentHandler->canUpload (* this , _currentUri)) {
453
453
_currentHandler->upload (*this , _currentUri, *_currentUpload);
454
454
}
455
455
_currentUpload->status = UPLOAD_FILE_WRITE;
@@ -488,12 +488,12 @@ bool WebServer::_parseForm(NetworkClient &client, String boundary, uint32_t len)
488
488
}
489
489
}
490
490
// Found the boundary string, finish processing this file upload
491
- if (_currentHandler && _currentHandler->canUpload (_currentUri)) {
491
+ if (_currentHandler && _currentHandler->canUpload (* this , _currentUri)) {
492
492
_currentHandler->upload (*this , _currentUri, *_currentUpload);
493
493
}
494
494
_currentUpload->totalSize += _currentUpload->currentSize ;
495
495
_currentUpload->status = UPLOAD_FILE_END;
496
- if (_currentHandler && _currentHandler->canUpload (_currentUri)) {
496
+ if (_currentHandler && _currentHandler->canUpload (* this , _currentUri)) {
497
497
_currentHandler->upload (*this , _currentUri, *_currentUpload);
498
498
}
499
499
log_v (" End File: %s Type: %s Size: %d" , _currentUpload->filename .c_str (), _currentUpload->type .c_str (), (int )_currentUpload->totalSize );
@@ -567,7 +567,7 @@ String WebServer::urlDecode(const String &text) {
567
567
568
568
bool WebServer::_parseFormUploadAborted () {
569
569
_currentUpload->status = UPLOAD_FILE_ABORTED;
570
- if (_currentHandler && _currentHandler->canUpload (_currentUri)) {
570
+ if (_currentHandler && _currentHandler->canUpload (* this , _currentUri)) {
571
571
_currentHandler->upload (*this , _currentUri, *_currentUpload);
572
572
}
573
573
return false ;
0 commit comments