File: handle_redirects.patch

package info (click to toggle)
python-gdata 2.0.18%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 8,460 kB
  • ctags: 17,143
  • sloc: python: 70,779; ansic: 150; makefile: 27; sh: 3
file content (16 lines) | stat: -rw-r--r-- 600 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Description: handle HTTP 301 redirects in addition to HTTP 302 ones
Origin: https://code.google.com/p/gdata-python-client/issues/detail?id=693#c3
Bug: https://bugs.debian.org/747849
Last-Update: 2014-05-12

--- a/src/gdata/service.py
+++ b/src/gdata/service.py
@@ -1084,7 +1084,7 @@
           return result_body
         return entry
       return feed
-    elif server_response.status == 302:
+    elif server_response.status in (301, 302):
       if redirects_remaining > 0:
         location = (server_response.getheader('Location')
                     or server_response.getheader('location'))