mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-11-30 02:47:56 +08:00
commit
0cadd5d2f8
@ -554,7 +554,7 @@ void http_aclient::send_request(const void* body, size_t len)
|
||||
{
|
||||
http_method_t method = header_->get_method();
|
||||
if (body && len > 0 && method != HTTP_METHOD_POST
|
||||
&& method != HTTP_METHOD_PUT) {
|
||||
&& method != HTTP_METHOD_PUT && method != HTTP_METHOD_PATCH) {
|
||||
|
||||
header_->set_content_length(len);
|
||||
header_->set_method(HTTP_METHOD_POST);
|
||||
|
@ -333,7 +333,7 @@ bool http_request::request(const void* data, size_t len)
|
||||
if (data && len > 0) {
|
||||
header_.set_content_length(len);
|
||||
|
||||
if (method != HTTP_METHOD_POST && method != HTTP_METHOD_PUT) {
|
||||
if (method != HTTP_METHOD_POST && method != HTTP_METHOD_PUT && method != HTTP_METHOD_PATCH) {
|
||||
// 在有数据体的条件下,重新设置 HTTP 请求方法
|
||||
header_.set_method(HTTP_METHOD_POST);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user