X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fhttp%2Fipagehandler.cpp;h=53211b116dfbcacdf401be05c3c03123258fd1cc;hb=023b2219068d481cd6a300982427c99bacd88a12;hp=b8bef90e378c2aa43c8c481fa13bd3bc4f28223a;hpb=dec33c63afafabf83c3039e916725cac6faef9b3;p=fms.git diff --git a/src/http/ipagehandler.cpp b/src/http/ipagehandler.cpp index b8bef90..53211b1 100644 --- a/src/http/ipagehandler.cpp +++ b/src/http/ipagehandler.cpp @@ -72,6 +72,19 @@ void IPageHandler::CreateQueryVarMap(Poco::Net::HTTPServerRequest &request, std: vars[(*i).first]=(*i).second; } + // for a POST method, the HTMLForm won't grab vars off the query string so we + // temporarily set the method to GET and parse with the HTMLForm again + if(request.getMethod()=="POST") + { + request.setMethod("GET"); + Poco::Net::HTMLForm form1(request,request.stream(),mpp); + for(Poco::Net::HTMLForm::ConstIterator i=form1.begin(); i!=form1.end(); i++) + { + vars[(*i).first]=(*i).second; + } + request.setMethod("POST"); + } + // get any multiparts std::map mpvars=mpp.GetVars(); for(std::map::iterator i=mpvars.begin(); i!=mpvars.end(); i++)