redirects don't have to be absolute

This commit is contained in:
meejah 2019-10-13 03:47:59 -06:00
parent 45bfe743d4
commit e894795898

View File

@ -2964,7 +2964,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi
body, headers = self.build_form(t="upload", when_done="/THERE",
file=("new.txt", self.NEWFILE_CONTENTS))
yield self.shouldRedirectTo(self.webish_url + self.public_url + "/foo",
self.webish_url + "/THERE",
"/THERE",
method="post", data=body, headers=headers,
code=http.FOUND)
fn = self._foo_node
@ -3618,7 +3618,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi
body, headers = self.build_form(t="mkdir", name="newdir",
when_done="/THERE")
yield self.shouldRedirectTo(self.webish_url + self.public_url + "/foo",
self.webish_url + "/THERE",
"/THERE",
method="post", data=body, headers=headers,
code=http.FOUND)
res = yield self._foo_node.get(u"newdir")
@ -3628,7 +3628,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi
def test_POST_mkdir_whendone_queryarg(self):
body, headers = self.build_form(t="mkdir", name="newdir")
url = self.webish_url + self.public_url + "/foo?when_done=/THERE"
yield self.shouldRedirectTo(url, self.webish_url + "/THERE",
yield self.shouldRedirectTo(url, "/THERE",
method="post", data=body, headers=headers,
code=http.FOUND)
res = yield self._foo_node.get(u"newdir")