This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author karlcow
Recipients BreamoreBoy, ezio.melotti, karlcow, mher, orsenthil, takahashi.shuhei
Date 2014-10-06.11:29:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1412594942.61.0.825691402686.issue18119@psf.upfronthosting.co.za>
In-reply-to
Content
This is the correct behavior
  GET http://example.com/foo
with a response containing 
  302 and Location: /bar#test
must trigger
  http://example.com/bar#test



Location is defined in 
http://tools.ietf.org/html/rfc7231#section-7.1.2

7.1.2. Location


   The "Location" header field is used in some responses to refer to a
   specific resource in relation to the response.  The type of
   relationship is defined by the combination of request method and
   status code semantics.

     Location = URI-reference

   The field value consists of a single URI-reference.  When it has the
   form of a relative reference ([RFC3986], Section 4.2), the final
   value is computed by resolving it against the effective request URI
   ([RFC3986], Section 5).

A bit after in the spec.


   If the Location value provided in a 3xx (Redirection) response does
   not have a fragment component, a user agent MUST process the
   redirection as if the value inherits the fragment component of the
   URI reference used to generate the request target (i.e., the
   redirection inherits the original reference's fragment, if any).

   For example, a GET request generated for the URI reference
   "http://www.example.org/~tim" might result in a 303 (See Other)
   response containing the header field:

     Location: /People.html#tim

   which suggests that the user agent redirect to
   "http://www.example.org/People.html#tim"

   Likewise, a GET request generated for the URI reference
   "http://www.example.org/index.html#larry" might result in a 301
   (Moved Permanently) response containing the header field:

     Location: http://www.example.net/index.html

   which suggests that the user agent redirect to
   "http://www.example.net/index.html#larry", preserving the original
   fragment identifier.
History
Date User Action Args
2014-10-06 11:29:02karlcowsetrecipients: + karlcow, orsenthil, ezio.melotti, mher, BreamoreBoy, takahashi.shuhei
2014-10-06 11:29:02karlcowsetmessageid: <1412594942.61.0.825691402686.issue18119@psf.upfronthosting.co.za>
2014-10-06 11:29:02karlcowlinkissue18119 messages
2014-10-06 11:29:01karlcowcreate