forked from aws/http-desync-guardian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrfc-compliant.yaml
190 lines (176 loc) · 4.18 KB
/
rfc-compliant.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
#
# These test-cases to ensure that the engine is not excessively prohibitive.
# And that RFC compliant requests are being classified as such.
#
- name: No headers
uri: /foo/bar
method: GET
version: HTTP/1.1
headers:
expected:
tier: Compliant
reason: Compliant
- name: Valid Transfer-Encoding (chunked)
uri: /foo/bar
method: POST
version: HTTP/1.1
headers:
- name: Transfer-Encoding
value: chunked
tier: Compliant
expected:
tier: Compliant
reason: Compliant
- name: Valid Content-Length
uri: /foo/bar
method: PUT
version: HTTP/1.1
headers:
- name: Content-Length
value: 1000
tier: Compliant
expected:
tier: Compliant
reason: Compliant
- name: Valid Transfer-Encoding (chunked) + custom header (non-ascii)
uri: /foo/bar
method: POST
version: HTTP/1.1
headers:
- name: "Transfer-Encoding"
value: "chunked"
tier: Compliant
- name: "My-Custom-Header"
value: "\t\t\tCustom-Value;\x60\x85\x93\xA0"
tier: Compliant
expected:
tier: Compliant
reason: Compliant
- name: Valid custom header with tchar in name and obs-text
uri: /foo/bar
method: POST
version: HTTP/1.1
headers:
- name: "My-Custom-Header.!#$%&'*+^_`|~0123456789"
value: "\t\t\tCustom-Value;\x60\x85\x93\xA0"
tier: Compliant
expected:
tier: Compliant
reason: Compliant
- name: Valid custom header with underscore in name
uri: /foo/bar
method: POST
version: HTTP/1.1
headers:
- name: "My_Custom_Header"
value: "\t\t\tCustom-Value;\x60\x85\x93\xA0"
tier: Compliant
expected:
tier: Compliant
reason: Compliant
- name: Valid custom header with dot in name
uri: /foo/bar
method: POST
version: HTTP/1.1
headers:
- name: "My.Custom.Header"
value: "\t\t\tCustom-Value;\x60\x85\x93\xA0"
tier: Compliant
expected:
tier: Compliant
reason: Compliant
- name: Valid custom header with digits in name
uri: /foo/bar
method: POST
version: HTTP/1.1
headers:
- name: "My-Custom-Header-0987654321"
value: "\t\t\tCustom-Value;\x60\x85\x93\xA0"
tier: Compliant
expected:
tier: Compliant
reason: Compliant
- name: Different Transfer-Encoding headers
uri: /foo/bar
method: POST
version: HTTP/1.1
headers:
- name: Transfer-Encoding
value: gzip
tier: Compliant
- name: Transfer-Encoding
value: deflate
tier: Compliant
- name: Transfer-Encoding
value: identity
tier: Compliant
- name: Transfer-Encoding
value: compress
tier: Compliant
- name: Transfer-Encoding
value: chunked
tier: Compliant
expected:
tier: Compliant
reason: Compliant
- name: Different Transfer-Encoding headers combined
uri: /foo/bar
method: POST
version: HTTP/1.1
headers:
- name: Transfer-Encoding
value: "gzip , deflate , \tidentity\t, compress\t, chunked"
tier: Compliant
expected:
tier: Compliant
reason: Compliant
- name: 'Transfer-Encoding with a param: chunked;custom_param'
uri: /foo/bar
method: POST
version: HTTP/1.1
headers:
- name: Transfer-Encoding
value: " gzip ; "
tier: Compliant
- name: Transfer-Encoding
value: "deflate\t\t;\t\t"
tier: Compliant
- name: Transfer-Encoding
value: "\t\t\t\tchunked;custom_param;\t\t\t\t"
tier: Compliant
expected:
tier: Compliant
reason: Compliant
- name: 'Compliant URL'
uri: "/user:[email protected]:8080/site/index.php?action=login%20++~!@#$%^&*()_+:<>?,./;'[]{}`~\\\"|&prev=index#form"
method: POST
version: HTTP/1.1
headers:
- name: Accept
value: "*/*"
tier: Compliant
expected:
tier: Compliant
reason: Compliant
- name: 'International in URI'
uri: "/странные-символы/поддерживаются"
method: GET
version: HTTP/1.1
headers:
- name: "X-Forwarded-For"
value: "1.1.1.1"
tier: "Compliant"
expected:
tier: Compliant
reason: Compliant
- name: 'Empty URI'
uri: ""
method: GET
version: HTTP/1.1
headers:
- name: "X-Forwarded-For"
value: "1.1.1.1"
tier: "Compliant"
expected:
tier: Compliant
reason: Compliant