Home
last modified time | relevance | path

Searched refs:url (Results 1 – 25 of 46) sorted by relevance

12

/unit/test/unit/
H A Dcontrol.py14 url = args[0] if len(args) == 1 else url_default
24 url = url if url.startswith('/') else url_default + '/' + url
25 arguments = (self, url) if conf is None else (self, conf, url)
34 def conf(self, conf, url): argument
38 def conf_get(self, url): argument
39 return self.get(**self._get_args(url))['body']
42 def conf_delete(self, url): argument
43 return self.delete(**self._get_args(url))['body']
46 def conf_post(self, conf, url): argument
49 def _get_args(self, url, conf=None): argument
[all …]
/unit/test/
H A Dtest_static.py115 resp = self.get(url='/index.html/')
145 etag = self.get(url='/')['headers']['ETag']
146 etag_2 = self.get(url='/README')['headers']['ETag']
157 resp = self.get(url='/dir')
177 self.get(url='/ di r /fi le')['body'] == 'blah'
184 self.get(url='/ di r %2Ffi le')['body'] == 'blah'
221 self.get(url='/ di r /фа йл')['body'] == 'blah'
244 assert self.get(url='/fifo')['status'] == 404, 'fifo'
265 _, sock = self.get(url='/', start=True, no_recv=True)
266 _, sock2 = self.get(url='/', start=True, no_recv=True)
[all …]
H A Dtest_variables.py48 assert self.get(url='/3')['status'] == 203, 'uri'
49 assert self.get(url='/4*')['status'] == 204, 'uri 2'
159 assert self.get(url='/3')['status'] == 203
165 assert self.get(url='/4*')['status'] == 204
182 assert self.get(url='/1')['status'] == 200
183 assert self.get(url='/2')['status'] == 404
192 assert self.get(url='/1')['status'] == 404
195 assert self.get(url='/2')['status'] == 404
198 assert self.get(url='/3')['status'] == 404
204 url='/?foo=h',
[all …]
H A Dtest_routing.py117 assert self.get(url='/blah')['status'] == 404
128 assert self.get(url='/blah')['status'] == 200
132 assert self.get(url='/bla')['status'] == 200
133 assert self.get(url='/blah')['status'] == 404
134 assert self.get(url='/blah1')['status'] == 200
138 assert self.get(url='/blah')['status'] == 200
139 assert self.get(url='/blah1')['status'] == 404
141 assert self.get(url='/blah2')['status'] == 200
230 assert self.get(url='/aBc')['status'] == 200
232 assert self.get(url='/ABc')['status'] == 404
[all …]
H A Dtest_static_variables.py33 assert self.get(url='/index.html')['status'] == 200
34 assert self.get(url='/d$r/file')['status'] == 200
37 assert self.get(url=temp_dir + '/assets/index.html')['status'] == 200
40 assert self.get(url='/index.html')['status'] == 200
47 assert self.get(url='/dir/file')['status'] == 200
49 assert self.get(url='/blah')['status'] == 404
59 assert self.get(url='/dir/file')['status'] == 200
61 assert self.get(url='/dir/blah')['status'] == 201
65 assert self.get(url=temp_dir)['status'] == 200
69 assert self.get(url='/assets')['status'] == 200
[all …]
H A Dtest_static_chroot.py38 assert self.get(url='/dir/file')['status'] == 200, 'default chroot'
45 assert self.get(url='/dir/file')['status'] == 200, 'chroot'
46 assert self.get(url='/index.html')['status'] == 403, 'chroot 403 2'
47 assert self.get(url='/file')['status'] == 403, 'chroot 403'
53 assert self.get(url='/dir/file')['status'] == 200, 'share array'
75 assert self.get(url='/dir/file')['status'] == 200, 'chroot'
79 assert self.get(url='/dir/file')['status'] == 200, 'empty absolute'
95 assert self.get(url=self.test_path)['status'] == 200, 'relative'
130 assert self.get(url='/dir/file')['status'] == 200, 'slash end'
136 assert self.get(url='/dir/file')['status'] == 200, 'no slash end'
[all …]
H A Dtest_static_types.py33 resp = self.get(url=http_url)
53 assert self.get(url='/file.xml')['status'] == 403, 'no mtype'
60 assert self.get(url='/file.mp4')['status'] == 403, 'app * mtype mp4'
65 assert self.get(url='/file.xml')['status'] == 403, 'video * mtype xml'
82 assert self.get(url='/file.mp4')['status'] == 403, 'negation sort mp4'
93 assert self.get(url='/file.php')['status'] == 403, 'regex fail'
103 self.get(url='/file.xml')['status'] == 403
109 assert self.get(url='/file.mp4')['status'] == 200, 'mixed case'
111 self.get(url='/file.xml')['status'] == 403
119 self.get(url='/file.xml')['status'] == 403
[all …]
H A Dtest_static_symlink.py29 assert self.get(url='/dir')['status'] == 301, 'dir'
30 assert self.get(url='/dir/file')['status'] == 200, 'file'
31 assert self.get(url='/link')['status'] == 301, 'symlink dir'
32 assert self.get(url='/link/file')['status'] == 200, 'symlink file'
39 assert self.get(url='/link/file')['status'] == 403, 'symlink disabled'
46 assert self.get(url='/link/file')['status'] == 200, 'symlink enabled'
73 assert self.get(url='/link/file')['status'] == 200, 'block enabled'
74 assert self.head(url='/link/file')['status'] == 403, 'block disabled'
83 assert self.get(url='/dir/dir/link')['status'] == 200, 'default chroot'
93 assert self.get(url='/dir/dir/link')['status'] == 404, 'chroot'
H A Dtest_java_application.py121 url='/?var1=val2',
247 url='/?var1=val2',
259 url='/',
380 headers = self.get(url='/1')['headers']
390 headers = self.get(url='/2')['headers']
402 headers = self.get(url='/3')['headers']
414 headers = self.get(url='/4')['headers']
426 headers = self.get(url='/5')['headers']
438 headers = self.get(url='/6')['headers']
471 resp = self.get(url='/dir1')
[all …]
H A Dtest_static_share.py31 assert self.get(url='/dir/file')['body'] == '1'
32 assert self.get(url='/dir2/file2')['body'] == '2'
36 assert self.get(url='/file')['body'] == '1'
37 assert self.get(url='/file2')['status'] == 404
48 assert self.get(url='/file')['body'] == '1'
49 assert self.get(url='/file2')['body'] == '2'
60 assert self.get(url='/file')['status'] == 404
61 assert self.get(url='/file2')['body'] == '2'
H A Dtest_asgi_targets.py57 assert self.get(url='/1')['status'] == 200
58 assert self.get(url='/2')['status'] == 201
68 assert self.get(url='/1')['status'] == 200
69 assert self.get(url='/2')['status'] == 201
79 assert self.get(url='/1')['status'] == 200
80 assert self.get(url='/2')['status'] == 201
92 assert self.get(url='/1')['status'] != 200
H A Dtest_php_targets.py46 assert self.get(url='/1')['body'] == '1'
47 assert self.get(url='/2')['body'] == '2'
48 assert self.get(url='/blah')['status'] == 503 # TODO 404
49 assert self.get(url='/')['body'] == 'index'
54 assert self.get(url='/')['body'] == '1'
59 assert self.get(url='/')['body'] == 'index'
H A Dtest_python_isolation_chroot.py19 self.getjson(url='/?path=' + temp_dir)['body']['FileExists']
24 self.getjson(url='/?path=/proc/self')['body']['FileExists'] == True
28 self.getjson(url='/?path=/dev/pts')['body']['FileExists'] == False
32 self.getjson(url='/?path=/sys/kernel')['body']['FileExists']
36 ret = self.getjson(url='/?path=/app/python/ns_inspect')
H A Dtest_static_mount.py65 resp = self.get(url='/mount/')
74 assert self.get(url='/mount/')['status'] == 403
81 resp = self.get(url='/mount/')
110 assert self.get(url='/mount/')['status'] == 200, 'block enabled'
111 assert self.head(url='/mount/')['status'] == 403, 'block disabled'
124 assert self.get(url='/mount/')['status'] == 200, 'chroot'
135 assert self.get(url='/mount/')['status'] == 403, 'chroot mount'
H A Dtest_python_isolation.py40 self.getjson(url='/?path=' + temp_dir)['body']['FileExists']
45 self.getjson(url='/?path=/proc/self')['body']['FileExists'] == True
49 self.getjson(url='/?path=/dev/pts')['body']['FileExists'] == False
53 self.getjson(url='/?path=/sys/kernel')['body']['FileExists']
57 ret = self.getjson(url='/?path=/app/python/ns_inspect')
94 self.getjson(url='/?path=/proc/self')['body']['FileExists'] == False
102 self.getjson(url='/?path=/proc/self')['body']['FileExists'] == True
H A Dtest_access_log.py233 self.get(url='/?blah&var=val')
247 self.get(url='/delete')
270 def check_format(format, expect, url='/'): argument
273 assert self.get(url=url)['status'] == 200
286 assert self.get(url='/time_local')['status'] == 200
302 assert self.get(url='/r_line')['status'] == 200
309 self.post(url='/bbs', body=body, read_timeout=1)
H A Dtest_python_targets.py43 resp = self.get(url='/1')
47 resp = self.get(url='/2')
H A Dtest_php_application.py73 url='/index.php/blah?var=val',
109 resp = self.get(url='/?var1=val1&var2=val2')
118 resp = self.get(url='/?')
147 resp = self.get(url='/?skip')
251 resp = self.get(url='/?var1=val1&var2=&var3')
361 self.get(url='/?precision=6')['headers']['X-Precision'] == '5'
372 self.get(url='/?precision=6')['headers']['X-Precision'] == '6'
626 assert self.get(url='/index.wrong')['status'] != 200, 'status'
669 resp = self.get(url='/?chdir=/')
679 resp = self.get(url='/subdir/')
[all …]
H A Dtest_go_isolation_rootfs.py27 obj = self.getjson(url='/?file=/go/app')['body']
31 obj = self.getjson(url='/?file=/bin/sh')['body']
H A Dtest_static_fallback.py58 resp = self.get(url='/403/')
66 assert self.get(url='/dir')['status'] == 301, 'fallback status 301'
100 self.get(url='/dir')['status'] == 301
H A Dtest_asgi_application.py76 resp = self.get(url='/?var1=val1&var2=val2')
85 resp = self.get(url='/ ?var1=val1&var2=val2')
90 resp = self.get(url='/ %20?var1=val1&var2=val2')
95 resp = self.get(url='/ %20 ?var1=val1&var2=val2')
100 resp = self.get(url='/blah %20 blah? var1= val1 & var2=val2')
108 resp = self.get(url='/?')
H A Dtest_go_isolation.py290 obj = self.getjson(url='/?file=/go/app')['body']
294 obj = self.getjson(url='/?file=/bin/sh')['body']
311 obj = self.getjson(url='/?file=/go/app')['body']
315 obj = self.getjson(url='/?file=/bin/sh')['body']
350 obj = self.getjson(url='/?mounts=true')['body']
360 obj = self.getjson(url='/?mounts=true')['body']
H A Dtest_asgi_lifespan.py92 assert self.get(url="/1")['status'] == 204
93 assert self.get(url="/2")['status'] == 204
/unit/src/nodejs/unit-http/
H A Dloader.mjs6 url: new URL("./websocket.js", import.meta.url).href,
12 url: new URL("./http.js", import.meta.url).href,
/unit/src/java/nginx/unit/
H A DResponse.java282 public String encodeRedirectUrl(String url) in encodeRedirectUrl() argument
284 return encodeRedirectURL(url); in encodeRedirectUrl()
288 public String encodeRedirectURL(String url) in encodeRedirectURL() argument
290 log("encodeRedirectURL: " + url); in encodeRedirectURL()
292 return url; in encodeRedirectURL()
297 public String encodeUrl(String url) in encodeUrl() argument
299 return encodeURL(url); in encodeUrl()
303 public String encodeURL(String url) in encodeURL() argument
305 log("encodeURL: " + url); in encodeURL()
307 return url; in encodeURL()

12