[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] Send Content-Length with POST 0 length body
From: |
Giuseppe Scrivano |
Subject: |
Re: [Bug-wget] Send Content-Length with POST 0 length body |
Date: |
Mon, 20 Oct 2014 17:26:09 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Matthew Atkinson <address@hidden> writes:
> diff --git a/src/ChangeLog b/src/ChangeLog
> index 1c4e2d5..447179e 100644
> --- a/src/ChangeLog
> +++ b/src/ChangeLog
> @@ -1,3 +1,8 @@
> +2014-10-19 Matthew Atkinson <address@hidden>
> +
> + * http.c (gethttp): Always send Content-Length header when method is
> post,
> + even with no post body, as some servers will reject the request
> otherwise
> +
> 2014-05-03 Tim Ruehsen <address@hidden>
>
> * retr.c (retrieve_url): fixed memory leak
> diff --git a/src/http.c b/src/http.c
> index 4b99c17..e020682 100644
> --- a/src/http.c
> +++ b/src/http.c
> @@ -1875,6 +1875,8 @@ gethttp (struct url *u, struct http_stat *hs, int *dt,
> struct url *proxy,
> xstrdup (number_to_static_string
> (body_data_size)),
> rel_value);
> }
> + else if (strcasecmp (opt.method, "post") == 0)
> + request_set_header (req, "Content-Length", "0", rel_none);
should we do this only for POST requests? What about doing it in any
case that "!(opt.body_data || opt.body_file)"?
Regards,
Giuseppe
- [Bug-wget] Bug Track, Tushar, 2014/10/18
- Re: [Bug-wget] Bug Track, Tim Rühsen, 2014/10/19
- [Bug-wget] Send Content-Length with POST 0 length body, Matthew Atkinson, 2014/10/19
- Re: [Bug-wget] Send Content-Length with POST 0 length body, Tim Rühsen, 2014/10/19
- Re: [Bug-wget] Send Content-Length with POST 0 length body, Matthew Atkinson, 2014/10/20
- Re: [Bug-wget] Send Content-Length with POST 0 length body,
Giuseppe Scrivano <=
- Re: [Bug-wget] Send Content-Length with POST 0 length body, Matthew Atkinson, 2014/10/20
- Re: [Bug-wget] Send Content-Length with POST 0 length body, Tim Rühsen, 2014/10/20
- Re: [Bug-wget] Send Content-Length with POST 0 length body, Matthew Atkinson, 2014/10/21
- Re: [Bug-wget] Send Content-Length with POST 0 length body, Giuseppe Scrivano, 2014/10/21
- Re: [Bug-wget] Send Content-Length with POST 0 length body, Matthew Atkinson, 2014/10/23
- Re: [Bug-wget] Send Content-Length with POST 0 length body, Tim Rühsen, 2014/10/22