http_parser.rb 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/linux.yml +2 -2
- data/.github/workflows/windows.yml +2 -2
- data/ext/ruby_http_parser/ext_help.h +6 -1
- data/ext/ruby_http_parser/ruby_http_parser.c +9 -1
- data/http_parser.rb.gemspec +2 -2
- data/tasks/compile.rake +1 -1
- metadata +3 -10
- data/spec/parser_spec.rb +0 -428
- data/spec/spec_helper.rb +0 -1
- data/spec/support/requests.json +0 -612
- data/spec/support/responses.json +0 -395
data/spec/support/requests.json
DELETED
|
@@ -1,612 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"name": "curl get",
|
|
4
|
-
"type": "HTTP_REQUEST",
|
|
5
|
-
"raw": "GET /test HTTP/1.1\r\nUser-Agent: curl/7.18.0 (i486-pc-linux-gnu) libcurl/7.18.0 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.1\r\nHost: 0.0.0.0=5000\r\nAccept: */*\r\n\r\n",
|
|
6
|
-
"should_keep_alive": true,
|
|
7
|
-
"message_complete_on_eof": false,
|
|
8
|
-
"http_major": 1,
|
|
9
|
-
"http_minor": 1,
|
|
10
|
-
"method": "GET",
|
|
11
|
-
"query_string": "",
|
|
12
|
-
"fragment": "",
|
|
13
|
-
"request_path": "/test",
|
|
14
|
-
"request_url": "/test",
|
|
15
|
-
"num_headers": 3,
|
|
16
|
-
"headers": {
|
|
17
|
-
"User-Agent": "curl/7.18.0 (i486-pc-linux-gnu) libcurl/7.18.0 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.1",
|
|
18
|
-
"Host": "0.0.0.0=5000",
|
|
19
|
-
"Accept": "*/*"
|
|
20
|
-
},
|
|
21
|
-
"body": "",
|
|
22
|
-
"strict": true
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"name": "firefox get",
|
|
26
|
-
"type": "HTTP_REQUEST",
|
|
27
|
-
"raw": "GET /favicon.ico HTTP/1.1\r\nHost: 0.0.0.0=5000\r\nUser-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko/2008061015 Firefox/3.0\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-us,en;q=0.5\r\nAccept-Encoding: gzip,deflate\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nKeep-Alive: 300\r\nConnection: keep-alive\r\n\r\n",
|
|
28
|
-
"should_keep_alive": true,
|
|
29
|
-
"message_complete_on_eof": false,
|
|
30
|
-
"http_major": 1,
|
|
31
|
-
"http_minor": 1,
|
|
32
|
-
"method": "GET",
|
|
33
|
-
"query_string": "",
|
|
34
|
-
"fragment": "",
|
|
35
|
-
"request_path": "/favicon.ico",
|
|
36
|
-
"request_url": "/favicon.ico",
|
|
37
|
-
"num_headers": 8,
|
|
38
|
-
"headers": {
|
|
39
|
-
"Host": "0.0.0.0=5000",
|
|
40
|
-
"User-Agent": "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko/2008061015 Firefox/3.0",
|
|
41
|
-
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
|
|
42
|
-
"Accept-Language": "en-us,en;q=0.5",
|
|
43
|
-
"Accept-Encoding": "gzip,deflate",
|
|
44
|
-
"Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7",
|
|
45
|
-
"Keep-Alive": "300",
|
|
46
|
-
"Connection": "keep-alive"
|
|
47
|
-
},
|
|
48
|
-
"body": "",
|
|
49
|
-
"strict": true
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"name": "dumbfuck",
|
|
53
|
-
"type": "HTTP_REQUEST",
|
|
54
|
-
"raw": "GET /dumbfuck HTTP/1.1\r\naaaaaaaaaaaaa:++++++++++\r\n\r\n",
|
|
55
|
-
"should_keep_alive": true,
|
|
56
|
-
"message_complete_on_eof": false,
|
|
57
|
-
"http_major": 1,
|
|
58
|
-
"http_minor": 1,
|
|
59
|
-
"method": "GET",
|
|
60
|
-
"query_string": "",
|
|
61
|
-
"fragment": "",
|
|
62
|
-
"request_path": "/dumbfuck",
|
|
63
|
-
"request_url": "/dumbfuck",
|
|
64
|
-
"num_headers": 1,
|
|
65
|
-
"headers": {
|
|
66
|
-
"aaaaaaaaaaaaa": "++++++++++"
|
|
67
|
-
},
|
|
68
|
-
"body": "",
|
|
69
|
-
"strict": true
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"name": "fragment in url",
|
|
73
|
-
"type": "HTTP_REQUEST",
|
|
74
|
-
"raw": "GET /forums/1/topics/2375?page=1#posts-17408 HTTP/1.1\r\n\r\n",
|
|
75
|
-
"should_keep_alive": true,
|
|
76
|
-
"message_complete_on_eof": false,
|
|
77
|
-
"http_major": 1,
|
|
78
|
-
"http_minor": 1,
|
|
79
|
-
"method": "GET",
|
|
80
|
-
"query_string": "page=1",
|
|
81
|
-
"fragment": "posts-17408",
|
|
82
|
-
"request_path": "/forums/1/topics/2375",
|
|
83
|
-
"request_url": "/forums/1/topics/2375?page=1#posts-17408",
|
|
84
|
-
"num_headers": 0,
|
|
85
|
-
"body": "",
|
|
86
|
-
"strict": true
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"name": "get no headers no body",
|
|
90
|
-
"type": "HTTP_REQUEST",
|
|
91
|
-
"raw": "GET /get_no_headers_no_body/world HTTP/1.1\r\n\r\n",
|
|
92
|
-
"should_keep_alive": true,
|
|
93
|
-
"message_complete_on_eof": false,
|
|
94
|
-
"http_major": 1,
|
|
95
|
-
"http_minor": 1,
|
|
96
|
-
"method": "GET",
|
|
97
|
-
"query_string": "",
|
|
98
|
-
"fragment": "",
|
|
99
|
-
"request_path": "/get_no_headers_no_body/world",
|
|
100
|
-
"request_url": "/get_no_headers_no_body/world",
|
|
101
|
-
"num_headers": 0,
|
|
102
|
-
"body": "",
|
|
103
|
-
"strict": true
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"name": "get one header no body",
|
|
107
|
-
"type": "HTTP_REQUEST",
|
|
108
|
-
"raw": "GET /get_one_header_no_body HTTP/1.1\r\nAccept: */*\r\n\r\n",
|
|
109
|
-
"should_keep_alive": true,
|
|
110
|
-
"message_complete_on_eof": false,
|
|
111
|
-
"http_major": 1,
|
|
112
|
-
"http_minor": 1,
|
|
113
|
-
"method": "GET",
|
|
114
|
-
"query_string": "",
|
|
115
|
-
"fragment": "",
|
|
116
|
-
"request_path": "/get_one_header_no_body",
|
|
117
|
-
"request_url": "/get_one_header_no_body",
|
|
118
|
-
"num_headers": 1,
|
|
119
|
-
"headers": {
|
|
120
|
-
"Accept": "*/*"
|
|
121
|
-
},
|
|
122
|
-
"body": "",
|
|
123
|
-
"strict": true
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
"name": "get funky content length body hello",
|
|
127
|
-
"type": "HTTP_REQUEST",
|
|
128
|
-
"raw": "GET /get_funky_content_length_body_hello HTTP/1.0\r\nconTENT-Length: 5\r\n\r\nHELLO",
|
|
129
|
-
"should_keep_alive": false,
|
|
130
|
-
"message_complete_on_eof": false,
|
|
131
|
-
"http_major": 1,
|
|
132
|
-
"http_minor": 0,
|
|
133
|
-
"method": "GET",
|
|
134
|
-
"query_string": "",
|
|
135
|
-
"fragment": "",
|
|
136
|
-
"request_path": "/get_funky_content_length_body_hello",
|
|
137
|
-
"request_url": "/get_funky_content_length_body_hello",
|
|
138
|
-
"num_headers": 1,
|
|
139
|
-
"headers": {
|
|
140
|
-
"conTENT-Length": "5"
|
|
141
|
-
},
|
|
142
|
-
"body": "HELLO",
|
|
143
|
-
"strict": true
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"name": "post identity body world",
|
|
147
|
-
"type": "HTTP_REQUEST",
|
|
148
|
-
"raw": "POST /post_identity_body_world?q=search#hey HTTP/1.1\r\nAccept: */*\r\nTransfer-Encoding: identity\r\nContent-Length: 5\r\n\r\nWorld",
|
|
149
|
-
"should_keep_alive": true,
|
|
150
|
-
"message_complete_on_eof": false,
|
|
151
|
-
"http_major": 1,
|
|
152
|
-
"http_minor": 1,
|
|
153
|
-
"method": "POST",
|
|
154
|
-
"query_string": "q=search",
|
|
155
|
-
"fragment": "hey",
|
|
156
|
-
"request_path": "/post_identity_body_world",
|
|
157
|
-
"request_url": "/post_identity_body_world?q=search#hey",
|
|
158
|
-
"num_headers": 3,
|
|
159
|
-
"headers": {
|
|
160
|
-
"Accept": "*/*",
|
|
161
|
-
"Transfer-Encoding": "identity",
|
|
162
|
-
"Content-Length": "5"
|
|
163
|
-
},
|
|
164
|
-
"body": "World",
|
|
165
|
-
"strict": true
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
"name": "post - chunked body: all your base are belong to us",
|
|
169
|
-
"type": "HTTP_REQUEST",
|
|
170
|
-
"raw": "POST /post_chunked_all_your_base HTTP/1.1\r\nTransfer-Encoding: chunked\r\n\r\n1e\r\nall your base are belong to us\r\n0\r\n\r\n",
|
|
171
|
-
"should_keep_alive": true,
|
|
172
|
-
"message_complete_on_eof": false,
|
|
173
|
-
"http_major": 1,
|
|
174
|
-
"http_minor": 1,
|
|
175
|
-
"method": "POST",
|
|
176
|
-
"query_string": "",
|
|
177
|
-
"fragment": "",
|
|
178
|
-
"request_path": "/post_chunked_all_your_base",
|
|
179
|
-
"request_url": "/post_chunked_all_your_base",
|
|
180
|
-
"num_headers": 1,
|
|
181
|
-
"headers": {
|
|
182
|
-
"Transfer-Encoding": "chunked"
|
|
183
|
-
},
|
|
184
|
-
"body": "all your base are belong to us",
|
|
185
|
-
"strict": true
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
"name": "two chunks ; triple zero ending",
|
|
189
|
-
"type": "HTTP_REQUEST",
|
|
190
|
-
"raw": "POST /two_chunks_mult_zero_end HTTP/1.1\r\nTransfer-Encoding: chunked\r\n\r\n5\r\nhello\r\n6\r\n world\r\n000\r\n\r\n",
|
|
191
|
-
"should_keep_alive": true,
|
|
192
|
-
"message_complete_on_eof": false,
|
|
193
|
-
"http_major": 1,
|
|
194
|
-
"http_minor": 1,
|
|
195
|
-
"method": "POST",
|
|
196
|
-
"query_string": "",
|
|
197
|
-
"fragment": "",
|
|
198
|
-
"request_path": "/two_chunks_mult_zero_end",
|
|
199
|
-
"request_url": "/two_chunks_mult_zero_end",
|
|
200
|
-
"num_headers": 1,
|
|
201
|
-
"headers": {
|
|
202
|
-
"Transfer-Encoding": "chunked"
|
|
203
|
-
},
|
|
204
|
-
"body": "hello world",
|
|
205
|
-
"strict": true
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
"name": "chunked with trailing headers. blech.",
|
|
209
|
-
"type": "HTTP_REQUEST",
|
|
210
|
-
"raw": "POST /chunked_w_trailing_headers HTTP/1.1\r\nTransfer-Encoding: chunked\r\n\r\n5\r\nhello\r\n6\r\n world\r\n0\r\nVary: *\r\nContent-Type: text/plain\r\n\r\n",
|
|
211
|
-
"should_keep_alive": true,
|
|
212
|
-
"message_complete_on_eof": false,
|
|
213
|
-
"http_major": 1,
|
|
214
|
-
"http_minor": 1,
|
|
215
|
-
"method": "POST",
|
|
216
|
-
"query_string": "",
|
|
217
|
-
"fragment": "",
|
|
218
|
-
"request_path": "/chunked_w_trailing_headers",
|
|
219
|
-
"request_url": "/chunked_w_trailing_headers",
|
|
220
|
-
"num_headers": 3,
|
|
221
|
-
"headers": {
|
|
222
|
-
"Transfer-Encoding": "chunked",
|
|
223
|
-
"Vary": "*",
|
|
224
|
-
"Content-Type": "text/plain"
|
|
225
|
-
},
|
|
226
|
-
"body": "hello world",
|
|
227
|
-
"strict": true
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
"name": "with bullshit after the length",
|
|
231
|
-
"type": "HTTP_REQUEST",
|
|
232
|
-
"raw": "POST /chunked_w_bullshit_after_length HTTP/1.1\r\nTransfer-Encoding: chunked\r\n\r\n5; ihatew3;whatthefuck=aretheseparametersfor\r\nhello\r\n6; blahblah; blah\r\n world\r\n0\r\n\r\n",
|
|
233
|
-
"should_keep_alive": true,
|
|
234
|
-
"message_complete_on_eof": false,
|
|
235
|
-
"http_major": 1,
|
|
236
|
-
"http_minor": 1,
|
|
237
|
-
"method": "POST",
|
|
238
|
-
"query_string": "",
|
|
239
|
-
"fragment": "",
|
|
240
|
-
"request_path": "/chunked_w_bullshit_after_length",
|
|
241
|
-
"request_url": "/chunked_w_bullshit_after_length",
|
|
242
|
-
"num_headers": 1,
|
|
243
|
-
"headers": {
|
|
244
|
-
"Transfer-Encoding": "chunked"
|
|
245
|
-
},
|
|
246
|
-
"body": "hello world",
|
|
247
|
-
"strict": true
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
"name": "with quotes",
|
|
251
|
-
"type": "HTTP_REQUEST",
|
|
252
|
-
"raw": "GET /with_\"stupid\"_quotes?foo=\"bar\" HTTP/1.1\r\n\r\n",
|
|
253
|
-
"should_keep_alive": true,
|
|
254
|
-
"message_complete_on_eof": false,
|
|
255
|
-
"http_major": 1,
|
|
256
|
-
"http_minor": 1,
|
|
257
|
-
"method": "GET",
|
|
258
|
-
"query_string": "foo=\"bar\"",
|
|
259
|
-
"fragment": "",
|
|
260
|
-
"request_path": "/with_\"stupid\"_quotes",
|
|
261
|
-
"request_url": "/with_\"stupid\"_quotes?foo=\"bar\"",
|
|
262
|
-
"num_headers": 0,
|
|
263
|
-
"headers": {
|
|
264
|
-
|
|
265
|
-
},
|
|
266
|
-
"body": "",
|
|
267
|
-
"strict": true
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
"name": "apachebench get",
|
|
271
|
-
"type": "HTTP_REQUEST",
|
|
272
|
-
"raw": "GET /test HTTP/1.0\r\nHost: 0.0.0.0:5000\r\nUser-Agent: ApacheBench/2.3\r\nAccept: */*\r\n\r\n",
|
|
273
|
-
"should_keep_alive": false,
|
|
274
|
-
"message_complete_on_eof": false,
|
|
275
|
-
"http_major": 1,
|
|
276
|
-
"http_minor": 0,
|
|
277
|
-
"method": "GET",
|
|
278
|
-
"query_string": "",
|
|
279
|
-
"fragment": "",
|
|
280
|
-
"request_path": "/test",
|
|
281
|
-
"request_url": "/test",
|
|
282
|
-
"num_headers": 3,
|
|
283
|
-
"headers": {
|
|
284
|
-
"Host": "0.0.0.0:5000",
|
|
285
|
-
"User-Agent": "ApacheBench/2.3",
|
|
286
|
-
"Accept": "*/*"
|
|
287
|
-
},
|
|
288
|
-
"body": "",
|
|
289
|
-
"strict": true
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
"name": "query url with question mark",
|
|
293
|
-
"type": "HTTP_REQUEST",
|
|
294
|
-
"raw": "GET /test.cgi?foo=bar?baz HTTP/1.1\r\n\r\n",
|
|
295
|
-
"should_keep_alive": true,
|
|
296
|
-
"message_complete_on_eof": false,
|
|
297
|
-
"http_major": 1,
|
|
298
|
-
"http_minor": 1,
|
|
299
|
-
"method": "GET",
|
|
300
|
-
"query_string": "foo=bar?baz",
|
|
301
|
-
"fragment": "",
|
|
302
|
-
"request_path": "/test.cgi",
|
|
303
|
-
"request_url": "/test.cgi?foo=bar?baz",
|
|
304
|
-
"num_headers": 0,
|
|
305
|
-
"headers": {
|
|
306
|
-
|
|
307
|
-
},
|
|
308
|
-
"body": "",
|
|
309
|
-
"strict": true
|
|
310
|
-
},
|
|
311
|
-
{
|
|
312
|
-
"name": "newline prefix get",
|
|
313
|
-
"type": "HTTP_REQUEST",
|
|
314
|
-
"raw": "\r\nGET /test HTTP/1.1\r\n\r\n",
|
|
315
|
-
"should_keep_alive": true,
|
|
316
|
-
"message_complete_on_eof": false,
|
|
317
|
-
"http_major": 1,
|
|
318
|
-
"http_minor": 1,
|
|
319
|
-
"method": "GET",
|
|
320
|
-
"query_string": "",
|
|
321
|
-
"fragment": "",
|
|
322
|
-
"request_path": "/test",
|
|
323
|
-
"request_url": "/test",
|
|
324
|
-
"num_headers": 0,
|
|
325
|
-
"headers": {
|
|
326
|
-
|
|
327
|
-
},
|
|
328
|
-
"body": "",
|
|
329
|
-
"strict": true
|
|
330
|
-
},
|
|
331
|
-
{
|
|
332
|
-
"name": "upgrade request",
|
|
333
|
-
"type": "HTTP_REQUEST",
|
|
334
|
-
"raw": "GET /demo HTTP/1.1\r\nHost: example.com\r\nConnection: Upgrade\r\nSec-WebSocket-Key2: 12998 5 Y3 1 .P00\r\nSec-WebSocket-Protocol: sample\r\nUpgrade: WebSocket\r\nSec-WebSocket-Key1: 4 @1 46546xW%0l 1 5\r\nOrigin: http://example.com\r\n\r\nHot diggity dogg",
|
|
335
|
-
"should_keep_alive": true,
|
|
336
|
-
"message_complete_on_eof": false,
|
|
337
|
-
"http_major": 1,
|
|
338
|
-
"http_minor": 1,
|
|
339
|
-
"method": "GET",
|
|
340
|
-
"query_string": "",
|
|
341
|
-
"fragment": "",
|
|
342
|
-
"request_path": "/demo",
|
|
343
|
-
"request_url": "/demo",
|
|
344
|
-
"num_headers": 7,
|
|
345
|
-
"upgrade": "Hot diggity dogg",
|
|
346
|
-
"headers": {
|
|
347
|
-
"Host": "example.com",
|
|
348
|
-
"Connection": "Upgrade",
|
|
349
|
-
"Sec-WebSocket-Key2": "12998 5 Y3 1 .P00",
|
|
350
|
-
"Sec-WebSocket-Protocol": "sample",
|
|
351
|
-
"Upgrade": "WebSocket",
|
|
352
|
-
"Sec-WebSocket-Key1": "4 @1 46546xW%0l 1 5",
|
|
353
|
-
"Origin": "http://example.com"
|
|
354
|
-
},
|
|
355
|
-
"body": "",
|
|
356
|
-
"strict": true
|
|
357
|
-
},
|
|
358
|
-
{
|
|
359
|
-
"name": "connect request",
|
|
360
|
-
"type": "HTTP_REQUEST",
|
|
361
|
-
"raw": "CONNECT 0-home0.netscape.com:443 HTTP/1.0\r\nUser-agent: Mozilla/1.1N\r\nProxy-authorization: basic aGVsbG86d29ybGQ=\r\n\r\nsome data\r\nand yet even more data",
|
|
362
|
-
"should_keep_alive": false,
|
|
363
|
-
"message_complete_on_eof": false,
|
|
364
|
-
"http_major": 1,
|
|
365
|
-
"http_minor": 0,
|
|
366
|
-
"method": "CONNECT",
|
|
367
|
-
"query_string": "",
|
|
368
|
-
"fragment": "",
|
|
369
|
-
"request_path": "",
|
|
370
|
-
"request_url": "0-home0.netscape.com:443",
|
|
371
|
-
"num_headers": 2,
|
|
372
|
-
"upgrade": "some data\r\nand yet even more data",
|
|
373
|
-
"headers": {
|
|
374
|
-
"User-agent": "Mozilla/1.1N",
|
|
375
|
-
"Proxy-authorization": "basic aGVsbG86d29ybGQ="
|
|
376
|
-
},
|
|
377
|
-
"body": "",
|
|
378
|
-
"strict": true
|
|
379
|
-
},
|
|
380
|
-
{
|
|
381
|
-
"name": "report request",
|
|
382
|
-
"type": "HTTP_REQUEST",
|
|
383
|
-
"raw": "REPORT /test HTTP/1.1\r\n\r\n",
|
|
384
|
-
"should_keep_alive": true,
|
|
385
|
-
"message_complete_on_eof": false,
|
|
386
|
-
"http_major": 1,
|
|
387
|
-
"http_minor": 1,
|
|
388
|
-
"method": "REPORT",
|
|
389
|
-
"query_string": "",
|
|
390
|
-
"fragment": "",
|
|
391
|
-
"request_path": "/test",
|
|
392
|
-
"request_url": "/test",
|
|
393
|
-
"num_headers": 0,
|
|
394
|
-
"headers": {
|
|
395
|
-
|
|
396
|
-
},
|
|
397
|
-
"body": "",
|
|
398
|
-
"strict": true
|
|
399
|
-
},
|
|
400
|
-
{
|
|
401
|
-
"name": "request with no http version",
|
|
402
|
-
"type": "HTTP_REQUEST",
|
|
403
|
-
"raw": "GET /\r\n\r\n",
|
|
404
|
-
"should_keep_alive": false,
|
|
405
|
-
"message_complete_on_eof": false,
|
|
406
|
-
"http_major": 0,
|
|
407
|
-
"http_minor": 9,
|
|
408
|
-
"method": "GET",
|
|
409
|
-
"query_string": "",
|
|
410
|
-
"fragment": "",
|
|
411
|
-
"request_path": "/",
|
|
412
|
-
"request_url": "/",
|
|
413
|
-
"num_headers": 0,
|
|
414
|
-
"headers": {
|
|
415
|
-
|
|
416
|
-
},
|
|
417
|
-
"body": "",
|
|
418
|
-
"strict": true
|
|
419
|
-
},
|
|
420
|
-
{
|
|
421
|
-
"name": "m-search request",
|
|
422
|
-
"type": "HTTP_REQUEST",
|
|
423
|
-
"raw": "M-SEARCH * HTTP/1.1\r\nHOST: 239.255.255.250:1900\r\nMAN: \"ssdp:discover\"\r\nST: \"ssdp:all\"\r\n\r\n",
|
|
424
|
-
"should_keep_alive": true,
|
|
425
|
-
"message_complete_on_eof": false,
|
|
426
|
-
"http_major": 1,
|
|
427
|
-
"http_minor": 1,
|
|
428
|
-
"method": "M-SEARCH",
|
|
429
|
-
"query_string": "",
|
|
430
|
-
"fragment": "",
|
|
431
|
-
"request_path": "*",
|
|
432
|
-
"request_url": "*",
|
|
433
|
-
"num_headers": 3,
|
|
434
|
-
"headers": {
|
|
435
|
-
"HOST": "239.255.255.250:1900",
|
|
436
|
-
"MAN": "\"ssdp:discover\"",
|
|
437
|
-
"ST": "\"ssdp:all\""
|
|
438
|
-
},
|
|
439
|
-
"body": "",
|
|
440
|
-
"strict": true
|
|
441
|
-
},
|
|
442
|
-
{
|
|
443
|
-
"name": "line folding in header value",
|
|
444
|
-
"type": "HTTP_REQUEST",
|
|
445
|
-
"raw": "GET / HTTP/1.1\r\nLine1: abc\r\n\tdef\r\n ghi\r\n\t\tjkl\r\n mno \r\n\t \tqrs\r\nLine2: \t line2\t\r\n\r\n",
|
|
446
|
-
"should_keep_alive": true,
|
|
447
|
-
"message_complete_on_eof": false,
|
|
448
|
-
"http_major": 1,
|
|
449
|
-
"http_minor": 1,
|
|
450
|
-
"method": "GET",
|
|
451
|
-
"query_string": "",
|
|
452
|
-
"fragment": "",
|
|
453
|
-
"request_path": "/",
|
|
454
|
-
"request_url": "/",
|
|
455
|
-
"num_headers": 2,
|
|
456
|
-
"headers": {
|
|
457
|
-
"Line1": "abc\tdef ghi\t\tjkl mno \t \tqrs",
|
|
458
|
-
"Line2": "line2\t"
|
|
459
|
-
},
|
|
460
|
-
"body": "",
|
|
461
|
-
"strict": true
|
|
462
|
-
},
|
|
463
|
-
{
|
|
464
|
-
"name": "host terminated by a query string",
|
|
465
|
-
"type": "HTTP_REQUEST",
|
|
466
|
-
"raw": "GET http://hypnotoad.org?hail=all HTTP/1.1\r\n\r\n",
|
|
467
|
-
"should_keep_alive": true,
|
|
468
|
-
"message_complete_on_eof": false,
|
|
469
|
-
"http_major": 1,
|
|
470
|
-
"http_minor": 1,
|
|
471
|
-
"method": "GET",
|
|
472
|
-
"query_string": "hail=all",
|
|
473
|
-
"fragment": "",
|
|
474
|
-
"request_path": "",
|
|
475
|
-
"request_url": "http://hypnotoad.org?hail=all",
|
|
476
|
-
"num_headers": 0,
|
|
477
|
-
"headers": {
|
|
478
|
-
|
|
479
|
-
},
|
|
480
|
-
"body": "",
|
|
481
|
-
"strict": true
|
|
482
|
-
},
|
|
483
|
-
{
|
|
484
|
-
"name": "host:port terminated by a query string",
|
|
485
|
-
"type": "HTTP_REQUEST",
|
|
486
|
-
"raw": "GET http://hypnotoad.org:1234?hail=all HTTP/1.1\r\n\r\n",
|
|
487
|
-
"should_keep_alive": true,
|
|
488
|
-
"message_complete_on_eof": false,
|
|
489
|
-
"http_major": 1,
|
|
490
|
-
"http_minor": 1,
|
|
491
|
-
"method": "GET",
|
|
492
|
-
"query_string": "hail=all",
|
|
493
|
-
"fragment": "",
|
|
494
|
-
"request_path": "",
|
|
495
|
-
"request_url": "http://hypnotoad.org:1234?hail=all",
|
|
496
|
-
"port": 1234,
|
|
497
|
-
"num_headers": 0,
|
|
498
|
-
"headers": {
|
|
499
|
-
|
|
500
|
-
},
|
|
501
|
-
"body": "",
|
|
502
|
-
"strict": true
|
|
503
|
-
},
|
|
504
|
-
{
|
|
505
|
-
"name": "host:port terminated by a space",
|
|
506
|
-
"type": "HTTP_REQUEST",
|
|
507
|
-
"raw": "GET http://hypnotoad.org:1234 HTTP/1.1\r\n\r\n",
|
|
508
|
-
"should_keep_alive": true,
|
|
509
|
-
"message_complete_on_eof": false,
|
|
510
|
-
"http_major": 1,
|
|
511
|
-
"http_minor": 1,
|
|
512
|
-
"method": "GET",
|
|
513
|
-
"query_string": "",
|
|
514
|
-
"fragment": "",
|
|
515
|
-
"request_path": "",
|
|
516
|
-
"request_url": "http://hypnotoad.org:1234",
|
|
517
|
-
"port": 1234,
|
|
518
|
-
"num_headers": 0,
|
|
519
|
-
"headers": {
|
|
520
|
-
|
|
521
|
-
},
|
|
522
|
-
"body": "",
|
|
523
|
-
"strict": true
|
|
524
|
-
},
|
|
525
|
-
{
|
|
526
|
-
"name": "PATCH request",
|
|
527
|
-
"type": "HTTP_REQUEST",
|
|
528
|
-
"raw": "PATCH /file.txt HTTP/1.1\r\nHost: www.example.com\r\nContent-Type: application/example\r\nIf-Match: \"e0023aa4e\"\r\nContent-Length: 10\r\n\r\ncccccccccc",
|
|
529
|
-
"should_keep_alive": true,
|
|
530
|
-
"message_complete_on_eof": false,
|
|
531
|
-
"http_major": 1,
|
|
532
|
-
"http_minor": 1,
|
|
533
|
-
"method": "PATCH",
|
|
534
|
-
"query_string": "",
|
|
535
|
-
"fragment": "",
|
|
536
|
-
"request_path": "/file.txt",
|
|
537
|
-
"request_url": "/file.txt",
|
|
538
|
-
"num_headers": 4,
|
|
539
|
-
"headers": {
|
|
540
|
-
"Host": "www.example.com",
|
|
541
|
-
"Content-Type": "application/example",
|
|
542
|
-
"If-Match": "\"e0023aa4e\"",
|
|
543
|
-
"Content-Length": "10"
|
|
544
|
-
},
|
|
545
|
-
"body": "cccccccccc",
|
|
546
|
-
"strict": true
|
|
547
|
-
},
|
|
548
|
-
{
|
|
549
|
-
"name": "connect caps request",
|
|
550
|
-
"type": "HTTP_REQUEST",
|
|
551
|
-
"raw": "CONNECT HOME0.NETSCAPE.COM:443 HTTP/1.0\r\nUser-agent: Mozilla/1.1N\r\nProxy-authorization: basic aGVsbG86d29ybGQ=\r\n\r\n",
|
|
552
|
-
"should_keep_alive": false,
|
|
553
|
-
"message_complete_on_eof": false,
|
|
554
|
-
"http_major": 1,
|
|
555
|
-
"http_minor": 0,
|
|
556
|
-
"method": "CONNECT",
|
|
557
|
-
"query_string": "",
|
|
558
|
-
"fragment": "",
|
|
559
|
-
"request_path": "",
|
|
560
|
-
"request_url": "HOME0.NETSCAPE.COM:443",
|
|
561
|
-
"num_headers": 2,
|
|
562
|
-
"upgrade": "",
|
|
563
|
-
"headers": {
|
|
564
|
-
"User-agent": "Mozilla/1.1N",
|
|
565
|
-
"Proxy-authorization": "basic aGVsbG86d29ybGQ="
|
|
566
|
-
},
|
|
567
|
-
"body": "",
|
|
568
|
-
"strict": true
|
|
569
|
-
},
|
|
570
|
-
{
|
|
571
|
-
"name": "utf-8 path request",
|
|
572
|
-
"type": "HTTP_REQUEST",
|
|
573
|
-
"strict": false,
|
|
574
|
-
"raw": "GET /δ¶/δt/pope?q=1#narf HTTP/1.1\r\nHost: github.com\r\n\r\n",
|
|
575
|
-
"should_keep_alive": true,
|
|
576
|
-
"message_complete_on_eof": false,
|
|
577
|
-
"http_major": 1,
|
|
578
|
-
"http_minor": 1,
|
|
579
|
-
"method": "GET",
|
|
580
|
-
"query_string": "q=1",
|
|
581
|
-
"fragment": "narf",
|
|
582
|
-
"request_path": "/δ¶/δt/pope",
|
|
583
|
-
"request_url": "/δ¶/δt/pope?q=1#narf",
|
|
584
|
-
"num_headers": 1,
|
|
585
|
-
"headers": {
|
|
586
|
-
"Host": "github.com"
|
|
587
|
-
},
|
|
588
|
-
"body": ""
|
|
589
|
-
},
|
|
590
|
-
{
|
|
591
|
-
"name": "hostname underscore",
|
|
592
|
-
"type": "HTTP_REQUEST",
|
|
593
|
-
"strict": false,
|
|
594
|
-
"raw": "CONNECT home_0.netscape.com:443 HTTP/1.0\r\nUser-agent: Mozilla/1.1N\r\nProxy-authorization: basic aGVsbG86d29ybGQ=\r\n\r\n",
|
|
595
|
-
"should_keep_alive": false,
|
|
596
|
-
"message_complete_on_eof": false,
|
|
597
|
-
"http_major": 1,
|
|
598
|
-
"http_minor": 0,
|
|
599
|
-
"method": "CONNECT",
|
|
600
|
-
"query_string": "",
|
|
601
|
-
"fragment": "",
|
|
602
|
-
"request_path": "",
|
|
603
|
-
"request_url": "home_0.netscape.com:443",
|
|
604
|
-
"num_headers": 2,
|
|
605
|
-
"upgrade": "",
|
|
606
|
-
"headers": {
|
|
607
|
-
"User-agent": "Mozilla/1.1N",
|
|
608
|
-
"Proxy-authorization": "basic aGVsbG86d29ybGQ="
|
|
609
|
-
},
|
|
610
|
-
"body": ""
|
|
611
|
-
}
|
|
612
|
-
]
|