diff options
| author | Joel Klinghed <the_jk@spawned.biz> | 2021-11-18 00:20:23 +0100 |
|---|---|---|
| committer | Joel Klinghed <the_jk@spawned.biz> | 2021-11-18 00:24:41 +0100 |
| commit | 8b04f96297f678b22d5c4374456dba6f79827257 (patch) | |
| tree | 973c2ac7de94186d7379551559c9b401514c251b /src/transport.cc | |
| parent | 33405111d53ac0288adbd2881f3e5a7c1cacc999 (diff) | |
site & transport: Make sure to url escape Location header
Diffstat (limited to 'src/transport.cc')
| -rw-r--r-- | src/transport.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/transport.cc b/src/transport.cc index 8195db7..50f83e4 100644 --- a/src/transport.cc +++ b/src/transport.cc @@ -3,6 +3,7 @@ #include "pathutil.hh" #include "strutil.hh" #include "transport.hh" +#include "urlutil.hh" #include <utility> @@ -87,7 +88,8 @@ public: auto clean_path = path::cleanup(request->path()); if (clean_path != request->path()) { - auto response = transport->create_redirect(clean_path, false); + auto response = transport->create_redirect( + url::escape(clean_path, url::EscapeFlags::KEEP_SLASH), false); return response; } |
