mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-16 19:54:38 +01:00
fixed GH #1235: Poco::Net::HTTPClientSession::sendRequest() should also handle HTTP_PATCH
This commit is contained in:
parent
9d425d73e1
commit
86969b4a91
@ -220,6 +220,7 @@ std::ostream& HTTPClientSession::sendRequest(HTTPRequest& request)
|
||||
}
|
||||
_reconnect = keepAlive;
|
||||
_expectResponseBody = request.getMethod() != HTTPRequest::HTTP_HEAD;
|
||||
const std::string& method = request.getMethod();
|
||||
if (request.getChunkedTransferEncoding())
|
||||
{
|
||||
HTTPHeaderOutputStream hos(*this);
|
||||
@ -237,7 +238,7 @@ std::ostream& HTTPClientSession::sendRequest(HTTPRequest& request)
|
||||
#endif
|
||||
request.write(*_pRequestStream);
|
||||
}
|
||||
else if ((request.getMethod() != HTTPRequest::HTTP_PUT && request.getMethod() != HTTPRequest::HTTP_POST) || request.has(HTTPRequest::UPGRADE))
|
||||
else if ((method != HTTPRequest::HTTP_PUT && method != HTTPRequest::HTTP_POST && method != HTTPRequest::HTTP_PATCH) || request.has(HTTPRequest::UPGRADE))
|
||||
{
|
||||
Poco::CountingOutputStream cs;
|
||||
request.write(cs);
|
||||
|
Loading…
Reference in New Issue
Block a user