cURL 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 16:14:17 +0000

- **status**: pending-invalid --> closed-invalid
- **Comment**:

Cool, then we agree. Case closed!

---
** [bugs:#1489] location header with response 200**
**Status:** closed-invalid
**Labels:** http 
**Created:** Fri Mar 06, 2015 07:59 AM UTC by Guido Franceschini
**Last Updated:** Fri Mar 06, 2015 03:37 PM 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.