Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
9617a593
Commit
9617a593
authored
Feb 13, 2009
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#4894: document "newurl" parameter to redirect_request().
parent
76cb7edc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
Doc/library/urllib.request.rst
Doc/library/urllib.request.rst
+6
-5
No files found.
Doc/library/urllib.request.rst
View file @
9617a593
...
...
@@ -741,14 +741,15 @@ HTTPRedirectHandler Objects
precise meanings of the various redirection codes.
.. method:: HTTPRedirectHandler.redirect_request(req, fp, code, msg, hdrs)
.. method:: HTTPRedirectHandler.redirect_request(req, fp, code, msg, hdrs
, newurl
)
Return a :class:`Request` or ``None`` in response to a redirect. This is called
by the default implementations of the :meth:`http_error_30\*` methods when a
redirection is received from the server. If a redirection should take place,
return a new :class:`Request` to allow :meth:`http_error_30\*` to perform the
redirect. Otherwise, raise :exc:`HTTPError` if no other handler should try to
handle this URL, or return ``None`` if you can't but another handler might.
redirect to *newurl*. Otherwise, raise :exc:`HTTPError` if no other handler
should try to handle this URL, or return ``None`` if you can't but another
handler might.
.. note::
...
...
@@ -761,8 +762,8 @@ HTTPRedirectHandler Objects
.. method:: HTTPRedirectHandler.http_error_301(req, fp, code, msg, hdrs)
Redirect to the ``Location:``
URL. This method is called by the parent
:class:`OpenerDirector` when getting an HTTP 'moved permanently' response.
Redirect to the ``Location:``
or ``URI:`` URL. This method is called by the
parent
:class:`OpenerDirector` when getting an HTTP 'moved permanently' response.
.. method:: HTTPRedirectHandler.http_error_302(req, fp, code, msg, hdrs)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment