You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PsychicRequst.cpp void PsychicRequest::loadParams() line 287 checks for HTTP_POST body _addParams but HTTP_DELETE and HTTP_PUT also send params in request->body(). More knowledgeable person may have better advice to avoid breaking something.
One solution that worked for me is:
PsychicRequst.cpp void PsychicRequest::loadParams() line 287
I don't think this covers every scenario. "multipart/form-data" is another issue. ASYNCWebServer has more checking. Keeping it basic here I think. I will check jeremypoulter/ArduinoMongoose next. I did test "text/plain", HTTP_PUT and HTTP_DELETE. Would hope it doesn't break something else. Ideas welcome!
Thanks!
The text was updated successfully, but these errors were encountered:
Testing the below solution and so far working:
if ((this->method() != HTTP_GET) && (this->contentType().startsWith("application/x-www-form-urlencoded") || this->contentType().startsWith("text/plain")))
PsychicRequst.cpp void PsychicRequest::loadParams() line 287 checks for HTTP_POST body _addParams but HTTP_DELETE and HTTP_PUT also send params in request->body(). More knowledgeable person may have better advice to avoid breaking something.
One solution that worked for me is:
PsychicRequst.cpp void PsychicRequest::loadParams() line 287
if ((this->method() == HTTP_POST || this->method() == HTTP_PUT || this->method() == HTTP_DELETE) &&
(this->contentType().startsWith("application/x-www-form-urlencoded") || this->contentType().startsWith("text/plain")))
I don't think this covers every scenario. "multipart/form-data" is another issue. ASYNCWebServer has more checking. Keeping it basic here I think. I will check jeremypoulter/ArduinoMongoose next. I did test "text/plain", HTTP_PUT and HTTP_DELETE. Would hope it doesn't break something else. Ideas welcome!
Thanks!
The text was updated successfully, but these errors were encountered: