Debian Codegraph @

src/tests/keywords/urlquote

raw
1 #
2 # PRE: update if
3 #
4 update {
5 # Some encoders replace ~ with %7E RFC3986 Section 2.4 says this should not be done.
6 request:Tmp-String-0 := '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_.~'
7 request:Tmp-String-1 := '±§!@#$%^&*()+={[}]:;"\'|\<,>?/`'
8 request:Tmp-String-2 := '™œ¥¤'
9 request:Tmp-String-3 := '%C2%B1%C2%A7%21%40%23%24%25%5E%26%2A%28%29%2B%3D%7B%5B%7D%5D%3A%3B%22%27%7C%5C%3C%2C%3E%3F%2F%60'
10
11 request:Tmp-String-4 := '%E2%84%A2%C5%93%C2%A5%C2%A4'
12 reply:Filter-ID := 'filter'
13 }
14
15
16 if (<string>"%{urlquote:%{request:Tmp-String-0}}" != &Tmp-String-0) {
17 update reply {
18 Filter-Id += 'Fail 1'
19 }
20 }
21
22 if (<string>"%{urlquote:%{request:Tmp-String-1}}" != &Tmp-String-3) {
23 update reply {
24 Filter-Id += 'Fail 2'
25 }
26 }
27
28 if (<string>"%{urlquote:%{request:Tmp-String-2}}" != &Tmp-String-4) {
29 update reply {
30 Filter-Id += 'Fail 3'
31 }
32 }
33
34 if (<string>"%{urlunquote:%{request:Tmp-String-0}}" != &Tmp-String-0) {
35 update reply {
36 Filter-Id += 'Fail 4'
37 }
38 }
39
40 if (<string>"%{urlunquote:%{request:Tmp-String-3}}" != &Tmp-String-1) {
41 update reply {
42 Filter-Id += 'Fail 5'
43 }
44 }
45
46 if (<string>"%{urlunquote:%{request:Tmp-String-4}}" != &Tmp-String-2) {
47 update reply {
48 Filter-Id += 'Fail 6'
49 }
50 }