]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport 1.157
authorRaymond Hettinger <python@rcn.com>
Fri, 25 Apr 2003 05:36:48 +0000 (05:36 +0000)
committerRaymond Hettinger <python@rcn.com>
Fri, 25 Apr 2003 05:36:48 +0000 (05:36 +0000)
SF Patch 549151: urllib2 POSTs on redirect
(contributed by John J Lee)

Lib/urllib.py

index 82011ac7b345691709a4cbeeda2988b549513573..874130921468325c1351840a4c59b4d2854bc2cb 100644 (file)
@@ -581,6 +581,10 @@ class FancyURLopener(URLopener):
         """Error 301 -- also relocated (permanently)."""
         return self.http_error_302(url, fp, errcode, errmsg, headers, data)
 
+    def http_error_303(self, url, fp, errcode, errmsg, headers, data=None):
+        """Error 303 -- also relocated (essentially identical to 302)."""
+        return self.http_error_302(url, fp, errcode, errmsg, headers, data)
+
     def http_error_401(self, url, fp, errcode, errmsg, headers, data=None):
         """Error 401 -- authentication required.
         See this URL for a description of the basic authentication scheme: