mirror of
https://github.com/mirror/wget.git
synced 2025-02-08 02:30:17 +08:00
Always send Content-Length with POST, PUT, PATCH
This commit is contained in:
parent
375b671f01
commit
e0f149d29d
@ -1,3 +1,9 @@
|
|||||||
|
2014-10-21 Matthew Atkinson <mutley456@ntlworld.com> (tiny change)
|
||||||
|
|
||||||
|
* http.c (gethttp): Always send Content-Length header when method is POST,
|
||||||
|
PUT, or PATCH even with no post body, as some servers will reject the
|
||||||
|
request otherwise.
|
||||||
|
|
||||||
2014-11-03 Jakub Čajka <jcajka@redhat.com>
|
2014-11-03 Jakub Čajka <jcajka@redhat.com>
|
||||||
|
|
||||||
* iri.c (remote_to_utf8): Fixed assumption that char is signed. Fixes
|
* iri.c (remote_to_utf8): Fixed assumption that char is signed. Fixes
|
||||||
|
@ -1874,6 +1874,10 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy,
|
|||||||
xstrdup (number_to_static_string (body_data_size)),
|
xstrdup (number_to_static_string (body_data_size)),
|
||||||
rel_value);
|
rel_value);
|
||||||
}
|
}
|
||||||
|
else if (strcasecmp (opt.method, "post") == 0
|
||||||
|
|| strcasecmp (opt.method, "put") == 0
|
||||||
|
|| strcasecmp (opt.method, "patch") == 0)
|
||||||
|
request_set_header (req, "Content-Length", "0", rel_none);
|
||||||
}
|
}
|
||||||
|
|
||||||
retry_with_auth:
|
retry_with_auth:
|
||||||
|
Loading…
Reference in New Issue
Block a user