summaryrefslogtreecommitdiffhomepage
path: root/test/unit/applications
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2020-05-14 13:15:00 +0300
committerValentin Bartenev <vbart@nginx.com>2020-05-14 13:15:00 +0300
commit0174c971b5ec0d604e4e9becfa41e0bc31179e57 (patch)
tree8d0c0c41b10cc290084676aac836c1dd2313410b /test/unit/applications
parentd803ec39bc75622194802d249edc11fedc8e2441 (diff)
downloadunit-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/applications')
-rw-r--r--test/unit/applications/lang/node.py5
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",