web.redirect does not set Location header to absolute URI

Bug #118236 reported by Anand Chitipothu on 2007-06-01
2
Affects Status Importance Assigned to Milestone
web.py
Undecided
Anand Chitipothu

Bug Description

web.redirect does not set Location header to absolute URI. HTTP/1.1 specifications says that it must be absolute URI.

    def test_redirect(self):
        fakerequest('GET', '/foo/bar')
        web.redirect('bar2')
        self.assertEquals(get_header('Location'), 'http://0.0.0.0:8080/foo/bar2')

======================================================================
FAIL: test_redirect (__main__.WebpyTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "fake.py", line 38, in test_redirect
    self.assertEquals(get_header('Location'), 'http://0.0.0.0:8080/foo/bar2')
AssertionError: 'bar2' != 'http://0.0.0.0:8080/foo/bar2'

Anand Chitipothu (anandology) wrote :

fixed in r171.

Changed in webpy:
status: New → Fix Committed
Changed in webpy:
assignee: nobody → anandology
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers