We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30b9890 commit b429641Copy full SHA for b429641
couchdb/http.py
@@ -349,6 +349,14 @@ def _try_request():
349
if num_redirects > self.max_redirects:
350
raise RedirectLimit('Redirection limit exceeded')
351
location = resp.getheader('location')
352
+
353
+ # in case of relative location: add scheme and host to the location
354
+ location_split = util.urlsplit(location)
355
356
+ if not location_split[0]:
357
+ orig_url_split = util.urlsplit(url)
358
+ location = util.urlunsplit(orig_url_split[:2] + location_split[2:])
359
360
if status == 301:
361
self.perm_redirects[url] = location
362
elif status == 303:
0 commit comments