cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: [ curl-Bugs-621576 ] don't honor redirect on PUT/POST

From: Roth, Kevin P. <KPRoth_at_MarathonOil.com>
Date: Fri, 11 Oct 2002 09:03:21 -0400

One could take the view that, since curl's DEFAULT behavior is to NOT follow redirects, then the user has already made his wishes known by setting --location (or CURLOPT_FOLLOWLOCATION). You (the programmer) should always know if you're doing a POST, and should simply not turn on this option if you don't want redirects to be followed.
 
The only real question (in my mind) is whether the POST data gets sent to the new location, or whether it should turn the prior POST request into a GET instead. I think that issue has been visited recently though.
 
--Kevin
 

        -----Original Message-----
        From: noreply_at_sourceforge.net [mailto:noreply_at_sourceforge.net]
        Sent: Thu 10/10/02 5:17 PM
        To: noreply_at_sourceforge.net
        Cc:
        Subject: [ curl-Bugs-621576 ] don't honor redirect on PUT/POST
        
        

        Bugs item #621576, was opened at 2002-10-10 16:17
        You can respond by visiting:
        https://sourceforge.net/tracker/?func=detail&atid=100976&aid=621576&group_id=976
        
        Category: http
        Group: None
        Status: Open
        Resolution: None
        Priority: 5
        Submitted By: Jeff Lawson (bovineone)
        Assigned to: Daniel Stenberg (bagder)
        Summary: don't honor redirect on PUT/POST
        
        Initial Comment:
        In accordance with RFC 2616, section 10.3.3:
        
           If the 302 status code is received in response to a
        request other
           than GET or HEAD, the user agent MUST NOT
        automatically redirect the
           request unless it can be confirmed by the user, since
        this might
           change the conditions under which the request was
        issued.
        
        Automatically redirecting on a PUT/POST, for example,
        should be disallowed. Currently if
        CURLOPT_FOLLOWLOCATION is set, cURL will
        redirect on those.
        
        
        ----------------------------------------------------------------------
        
        You can respond by visiting:
        https://sourceforge.net/tracker/?func=detail&atid=100976&aid=621576&group_id=976
        
        
        -------------------------------------------------------
        This sf.net email is sponsored by:ThinkGeek
        Welcome to geek heaven.
        http://thinkgeek.com/sf
        

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2002-10-11