aboutsummaryrefslogtreecommitdiffstats
path: root/test/functional/util
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2022-12-31 16:45:57 +0000
committerVsevolod Stakhov <vsevolod@rspamd.com>2022-12-31 16:45:57 +0000
commit9df22a9472b884802ac1a5b1c80859f2770b1a41 (patch)
tree126614aea5b6555b2ecf4812cdbf2e694d41f2dc /test/functional/util
parentc7582132f0a5a3274913630fd51ab2b199dd41e9 (diff)
downloadrspamd-9df22a9472b884802ac1a5b1c80859f2770b1a41.tar.gz
rspamd-9df22a9472b884802ac1a5b1c80859f2770b1a41.zip
[Test] Fix some minor stuff in dummy_http server
Diffstat (limited to 'test/functional/util')
-rwxr-xr-xtest/functional/util/dummy_http.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/functional/util/dummy_http.py b/test/functional/util/dummy_http.py
index 791cdf376..5052f51b6 100755
--- a/test/functional/util/dummy_http.py
+++ b/test/functional/util/dummy_http.py
@@ -36,7 +36,7 @@ class MainHandler(tornado.web.RequestHandler):
if key == 'au':
# Return a string 'hit' if 'key' is equal to 'au'
self.set_header("Content-Type", "text/plain")
- self.write("hit")
+ self.write("1.0")
else:
# Return a 404 HTTP error if 'key' is not equal to 'au'
raise tornado.web.HTTPError(404)
@@ -88,16 +88,16 @@ class MainHandler(tornado.web.RequestHandler):
self.set_header("Content-Type", "text/plain")
if path == "/redirect1":
# Send an HTTP redirect to the bind address of the server
- self.redirect(f"http://{self.request.host}:{self.request.port}/hello")
+ self.redirect(f"{self.request.protocol}://{self.request.host}/hello")
elif path == "/redirect2":
# Send an HTTP redirect to the bind address of the server
- self.redirect(f"http://{self.request.host}:{self.request.port}/redirect1")
+ self.redirect(f"{self.request.protocol}://{self.request.host}/redirect1")
elif self.path == "/redirect3":
# Send an HTTP redirect to the bind address of the server
- self.redirect(f"http://{self.request.host}:{self.request.port}/redirect4")
+ self.redirect(f"{self.request.protocol}://{self.request.host}/redirect4")
elif self.path == "/redirect4":
# Send an HTTP redirect to the bind address of the server
- self.redirect(f"http://{self.request.host}:{self.request.port}/redirect3")
+ self.redirect(f"{self.request.protocol}://{self.request.host}/redirect3")
else:
self.send_response(200)
self.set_header("Content-Type", "text/plain")