Matthew Atkinson <[email protected]> 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 <[email protected]> > + > + * 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 <[email protected]> > > * 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
