File tree Expand file tree Collapse file tree 5 files changed +15
-0
lines changed Expand file tree Collapse file tree 5 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 5
5
)
6
6
7
7
var fileUrlReplacer = strings .NewReplacer (
8
+ "%" , "%25" ,
8
9
"?" , "%3f" ,
9
10
"&" , "%26" ,
10
11
"#" , "%23" ,
Original file line number Diff line number Diff line change @@ -14,4 +14,15 @@ assert "$file1" 'vhost1/file1.txt'
14
14
(curl_get_body http://127.0.0.1:3003/hello/ | grep -q ' ./index.txt' ) ||
15
15
fail " resource /hello/ does not contains './index.txt'"
16
16
17
+ (curl_get_body ' http://127.0.0.1:3003/' | grep -q -F ' escape-escaped%252fslash' ) ||
18
+ fail " link URL escape incorrect"
19
+ (curl_get_body ' http://127.0.0.1:3003/' | grep -q -F ' escape%23sharp' ) ||
20
+ fail " link URL escape incorrect"
21
+ (curl_get_body ' http://127.0.0.1:3003/' | grep -q -F ' escape%25percent' ) ||
22
+ fail " link URL escape incorrect"
23
+
24
+ assert $( curl_head_status ' http://127.0.0.1:3003/escape-escaped%252fslash/' ) ' 200'
25
+ assert $( curl_head_status ' http://127.0.0.1:3003/escape%23sharp' ) ' 200'
26
+ assert $( curl_head_status ' http://127.0.0.1:3003/escape%25percent' ) ' 200'
27
+
17
28
jobs -p | xargs kill
Original file line number Diff line number Diff line change
1
+ vhost1/escape#sharp/index.txt
Original file line number Diff line number Diff line change
1
+ vhost1/escape%percent/index.txt
Original file line number Diff line number Diff line change
1
+ vhost1/escape%2fslash/index.txt
You can’t perform that action at this time.
0 commit comments