Mailing Lists
cURL Mailing List Monthly Index Single Mail
curl-tracker Archives
[curl:bugs] #1489 location header with response 200
From: Daniel Stenberg <bagder_at_users.sf.net>
Date: Fri, 06 Mar 2015 12:04:39 +0000
- **labels**: --> http
Thanks for your report and patch, but...
HTTP redirects are done with 3xx codes and a Location: header. If it is indeed sending back a 200 then it isn't a redirect. By definition. It would be wrong to act on that the way you suggest.
--- ** [bugs:#1489] location header with response 200** **Status:** pending-invalid **Labels:** http **Created:** Fri Mar 06, 2015 07:59 AM UTC by Guido Franceschini **Last Updated:** Fri Mar 06, 2015 07:59 AM UTC **Owner:** Daniel Stenberg I have a case where I receive an HTTP 200 response containg a location header. However libcurl only parses that header in case of 3xx responses. The HTTP spec does not seem to constrain the location header to just 3xx, thus I changed my copy of the code (libcurl 7.41.0) in http.c : 3698 from else if((k->httpcode >= 300 && k->httpcode < 400) && checkprefix("Location:", k->p) && !data->req.location) { to else if((k->httpcode >= 200 && k->httpcode < 400) && checkprefix("Location:", k->p) && !data->req.location) { This simple change has solved my problem. --- Sent from sourceforge.net because curl-tracker@cool.haxx.se is subscribed to https://sourceforge.net/p/curl/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/curl/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.Received on 2015-03-06 These mail archives are generated by hypermail. |