diff options
author | Valentin Bartenev <vbart@nginx.com> | 2020-05-14 13:15:00 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2020-05-14 13:15:00 +0300 |
commit | 0174c971b5ec0d604e4e9becfa41e0bc31179e57 (patch) | |
tree | 8d0c0c41b10cc290084676aac836c1dd2313410b /test/unit | |
parent | d803ec39bc75622194802d249edc11fedc8e2441 (diff) | |
download | unit-0174c971b5ec0d604e4e9becfa41e0bc31179e57.tar.gz unit-0174c971b5ec0d604e4e9becfa41e0bc31179e57.tar.bz2 |
Configuration: URI encoding in the "pass" option.
This is useful to escape "/" in path fragments. For example, in order
to reference the application named "foo/bar":
{
"pass": "applications/foo%2Fbar"
}
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/applications/lang/node.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/unit/applications/lang/node.py b/test/unit/applications/lang/node.py index d818298f..1f5d5027 100644 --- a/test/unit/applications/lang/node.py +++ b/test/unit/applications/lang/node.py @@ -1,5 +1,6 @@ import os import shutil +from urllib.parse import quote from unit.applications.proto import TestApplicationProto @@ -33,7 +34,9 @@ class TestApplicationNode(TestApplicationProto): self._load_conf( { - "listeners": {"*:7080": {"pass": "applications/" + script}}, + "listeners": { + "*:7080": {"pass": "applications/" + quote(script, '')} + }, "applications": { script: { "type": "external", |