diff options
author | Raymond Hettinger <python@rcn.com> | 2003-04-24 15:32:12 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-04-24 15:32:12 (GMT) |
commit | 024aaa1bfe27cbc47c2a7f88c21c9bb1b6605191 (patch) | |
tree | 4281503f96d6e650cd0338bfbbf58c5479f9dc51 /Doc/lib/liburllib.tex | |
parent | 1d5854fdc49073a3e49799192bc762ae0a68b64f (diff) | |
download | cpython-024aaa1bfe27cbc47c2a7f88c21c9bb1b6605191.zip cpython-024aaa1bfe27cbc47c2a7f88c21c9bb1b6605191.tar.gz cpython-024aaa1bfe27cbc47c2a7f88c21c9bb1b6605191.tar.bz2 |
SF Patch 549151: urllib2 POSTs on redirect
(contributed by John J Lee)
Diffstat (limited to 'Doc/lib/liburllib.tex')
-rw-r--r-- | Doc/lib/liburllib.tex | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/Doc/lib/liburllib.tex b/Doc/lib/liburllib.tex index c458616..a36df6b 100644 --- a/Doc/lib/liburllib.tex +++ b/Doc/lib/liburllib.tex @@ -254,12 +254,18 @@ actually retrieve a resource at an \file{https:} URL. \begin{classdesc}{FancyURLopener}{...} \class{FancyURLopener} subclasses \class{URLopener} providing default -handling for the following HTTP response codes: 301, 302 or 401. For -301 and 302 response codes, the \mailheader{Location} header is used to -fetch the actual URL. For 401 response codes (authentication -required), basic HTTP authentication is performed. For 301 and 302 response -codes, recursion is bounded by the value of the \var{maxtries} attribute, -which defaults 10. +handling for the following HTTP response codes: 301, 302, 303 and 401. +For 301, 302 and 303 response codes, the \mailheader{Location} header +is used to fetch the actual URL. For 401 response codes +(authentication required), basic HTTP authentication is performed. +For 301, 302 and 303 response codes, recursion is bounded by the value +of the \var{maxtries} attribute, which defaults 10. + +\note{According to the letter of \rfc{2616}, 301 and 302 responses to + POST requests must not be automatically redirected without + confirmation by the user. In reality, browsers do allow automatic + redirection of these responses, changing the POST to a GET, and + \module{urllib} reproduces this behaviour.} The parameters to the constructor are the same as those for \class{URLopener}. |