Only make the request a POST if POST parameters are present
This is a compatibility thing, eww. This also fixes handling ptsave from the command line.
This commit is contained in:
parent
7330d0412a
commit
5dfda0c528
@ -330,7 +330,10 @@ namespace http
|
||||
ByteString Request::SimpleAuth(ByteString uri, int *status, ByteString ID, ByteString session, std::map<ByteString, ByteString> post_data)
|
||||
{
|
||||
Request *request = new Request(uri);
|
||||
request->AddPostData(post_data);
|
||||
if (!post_data.empty())
|
||||
{
|
||||
request->AddPostData(post_data);
|
||||
}
|
||||
request->AuthHeaders(ID, session);
|
||||
request->Start();
|
||||
return request->Finish(status);
|
||||
|
Loading…
Reference in New Issue
Block a user