mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-23 00:07:59 +02:00
HTMLForm does not read URL parameters on POST or PUT
- fixed GH #175: HTMLForm does not read URL parameters on POST or PUT
This commit is contained in:
@@ -129,6 +129,15 @@ void HTMLForm::addPart(const std::string& name, PartSource* pSource)
|
||||
void HTMLForm::load(const HTTPRequest& request, std::istream& requestBody, PartHandler& handler)
|
||||
{
|
||||
clear();
|
||||
|
||||
URI uri(request.getURI());
|
||||
const std::string& query = uri.getRawQuery();
|
||||
if (!query.empty())
|
||||
{
|
||||
std::istringstream istr(query);
|
||||
readUrl(istr);
|
||||
}
|
||||
|
||||
if (request.getMethod() == HTTPRequest::HTTP_POST || request.getMethod() == HTTPRequest::HTTP_PUT)
|
||||
{
|
||||
std::string mediaType;
|
||||
@@ -145,12 +154,6 @@ void HTMLForm::load(const HTTPRequest& request, std::istream& requestBody, PartH
|
||||
readUrl(requestBody);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
URI uri(request.getURI());
|
||||
std::istringstream istr(uri.getRawQuery());
|
||||
readUrl(istr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user