summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--test/test_return.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/test_return.py b/test/test_return.py
index ff2e4566..82bf1e64 100644
--- a/test/test_return.py
+++ b/test/test_return.py
@@ -178,6 +178,21 @@ Connection: close
== "/#%23foo%3Fbar"
), 'location with a variable with encoding'
+ assert 'success' in self.conf(
+ '""', 'routes/0/action/location'
+ ), 'location empty'
+ assert self.get()['headers']['Location'] == ''
+
+ assert 'success' in self.conf(
+ '"${host}"', 'routes/0/action/location'
+ ), 'location empty with variable'
+ assert (
+ self.get(headers={"Host": "", "Connection": "close"})['headers'][
+ 'Location'
+ ]
+ == ""
+ ), 'location with empty variable'
+
def test_return_invalid(self):
def check_error(conf):
assert 'error' in self.conf(conf, 'routes/0/action')