mongrel 0.3.12.3 → 0.3.12.4

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -32,7 +32,7 @@ end
32
32
  setup_extension("http11", "http11")
33
33
 
34
34
  name="mongrel"
35
- version="0.3.12.3"
35
+ version="0.3.12.4"
36
36
 
37
37
  setup_gem(name, version) do |spec|
38
38
  spec.summary = "A small fast HTTP library and server that runs Rails, Camping, and Nitro apps."
@@ -520,7 +520,7 @@ void Init_http11()
520
520
  DEF_GLOBAL(server_protocol, "SERVER_PROTOCOL");
521
521
  DEF_GLOBAL(server_protocol_value, "HTTP/1.1");
522
522
  DEF_GLOBAL(http_host, "HTTP_HOST");
523
- DEF_GLOBAL(mongrel_version, "Mongrel 0.3.12.3");
523
+ DEF_GLOBAL(mongrel_version, "Mongrel 0.3.12.4");
524
524
  DEF_GLOBAL(server_software, "SERVER_SOFTWARE");
525
525
  DEF_GLOBAL(port_80, "80");
526
526
 
@@ -17,7 +17,7 @@
17
17
  #line 18 "ext/http11/http11_parser.c"
18
18
  static int http_parser_start = 0;
19
19
 
20
- static int http_parser_first_final = 53;
20
+ static int http_parser_first_final = 51;
21
21
 
22
22
  static int http_parser_error = 1;
23
23
 
@@ -59,17 +59,21 @@ size_t http_parser_execute(http_parser *parser, const char *buffer, size_t len)
59
59
  {
60
60
  case 0:
61
61
  switch( (*p) ) {
62
- case 68: goto tr13;
63
- case 71: goto tr14;
64
- case 72: goto tr15;
65
- case 79: goto tr16;
66
- case 80: goto tr17;
67
- case 84: goto tr18;
62
+ case 36: goto tr14;
63
+ case 95: goto tr14;
68
64
  }
65
+ if ( (*p) < 48 ) {
66
+ if ( 45 <= (*p) && (*p) <= 46 )
67
+ goto tr14;
68
+ } else if ( (*p) > 57 ) {
69
+ if ( 65 <= (*p) && (*p) <= 90 )
70
+ goto tr14;
71
+ } else
72
+ goto tr14;
69
73
  goto st1;
70
74
  st1:
71
75
  goto _out1;
72
- tr13:
76
+ tr14:
73
77
  #line 14 "ext/http11/http11_parser.rl"
74
78
  {MARK(parser, p); }
75
79
  goto st2;
@@ -77,183 +81,159 @@ st2:
77
81
  if ( ++p == pe )
78
82
  goto _out2;
79
83
  case 2:
80
- #line 81 "ext/http11/http11_parser.c"
81
- if ( (*p) == 69 )
82
- goto st3;
83
- goto st1;
84
- st3:
85
- if ( ++p == pe )
86
- goto _out3;
87
- case 3:
88
- if ( (*p) == 76 )
89
- goto st4;
90
- goto st1;
91
- st4:
92
- if ( ++p == pe )
93
- goto _out4;
94
- case 4:
95
- if ( (*p) == 69 )
96
- goto st5;
97
- goto st1;
98
- st5:
99
- if ( ++p == pe )
100
- goto _out5;
101
- case 5:
102
- if ( (*p) == 84 )
103
- goto st6;
104
- goto st1;
105
- st6:
106
- if ( ++p == pe )
107
- goto _out6;
108
- case 6:
109
- if ( (*p) == 69 )
110
- goto st7;
111
- goto st1;
112
- st7:
113
- if ( ++p == pe )
114
- goto _out7;
115
- case 7:
116
- if ( (*p) == 32 )
117
- goto tr33;
84
+ #line 85 "ext/http11/http11_parser.c"
85
+ switch( (*p) ) {
86
+ case 32: goto tr17;
87
+ case 36: goto st32;
88
+ case 95: goto st32;
89
+ }
90
+ if ( (*p) < 48 ) {
91
+ if ( 45 <= (*p) && (*p) <= 46 )
92
+ goto st32;
93
+ } else if ( (*p) > 57 ) {
94
+ if ( 65 <= (*p) && (*p) <= 90 )
95
+ goto st32;
96
+ } else
97
+ goto st32;
118
98
  goto st1;
119
- tr33:
99
+ tr17:
120
100
  #line 30 "ext/http11/http11_parser.rl"
121
101
  {
122
102
  assert(p - parser->mark >= 0 && "buffer overflow");
123
103
  if(parser->request_method != NULL)
124
104
  parser->request_method(parser->data, parser->mark, p - parser->mark);
125
105
  }
126
- goto st8;
127
- st8:
106
+ goto st3;
107
+ st3:
128
108
  if ( ++p == pe )
129
- goto _out8;
130
- case 8:
131
- #line 132 "ext/http11/http11_parser.c"
109
+ goto _out3;
110
+ case 3:
111
+ #line 112 "ext/http11/http11_parser.c"
132
112
  switch( (*p) ) {
133
- case 42: goto tr27;
134
- case 43: goto tr28;
135
- case 47: goto tr29;
136
- case 58: goto tr30;
113
+ case 42: goto tr10;
114
+ case 43: goto tr11;
115
+ case 47: goto tr12;
116
+ case 58: goto tr13;
137
117
  }
138
118
  if ( (*p) < 65 ) {
139
119
  if ( 45 <= (*p) && (*p) <= 57 )
140
- goto tr28;
120
+ goto tr11;
141
121
  } else if ( (*p) > 90 ) {
142
122
  if ( 97 <= (*p) && (*p) <= 122 )
143
- goto tr28;
123
+ goto tr11;
144
124
  } else
145
- goto tr28;
125
+ goto tr11;
146
126
  goto st1;
147
- tr27:
127
+ tr10:
148
128
  #line 14 "ext/http11/http11_parser.rl"
149
129
  {MARK(parser, p); }
150
- goto st9;
151
- st9:
130
+ goto st4;
131
+ st4:
152
132
  if ( ++p == pe )
153
- goto _out9;
154
- case 9:
155
- #line 156 "ext/http11/http11_parser.c"
133
+ goto _out4;
134
+ case 4:
135
+ #line 136 "ext/http11/http11_parser.c"
156
136
  if ( (*p) == 32 )
157
- goto tr34;
137
+ goto tr19;
158
138
  goto st1;
159
- tr34:
139
+ tr19:
160
140
  #line 35 "ext/http11/http11_parser.rl"
161
141
  {
162
142
  assert(p - parser->mark >= 0 && "buffer overflow");
163
143
  if(parser->request_uri != NULL)
164
144
  parser->request_uri(parser->data, parser->mark, p - parser->mark);
165
145
  }
166
- goto st10;
167
- tr46:
146
+ goto st5;
147
+ tr31:
168
148
  #line 40 "ext/http11/http11_parser.rl"
169
149
  {
170
150
  assert(p - parser->mark >= 0 && "buffer overflow");
171
151
  if(parser->query_string != NULL)
172
152
  parser->query_string(parser->data, parser->mark, p - parser->mark);
173
153
  }
174
- goto st10;
175
- st10:
154
+ goto st5;
155
+ st5:
176
156
  if ( ++p == pe )
177
- goto _out10;
178
- case 10:
179
- #line 180 "ext/http11/http11_parser.c"
157
+ goto _out5;
158
+ case 5:
159
+ #line 160 "ext/http11/http11_parser.c"
180
160
  if ( (*p) == 72 )
181
- goto tr11;
161
+ goto tr3;
182
162
  goto st1;
183
- tr11:
163
+ tr3:
184
164
  #line 14 "ext/http11/http11_parser.rl"
185
165
  {MARK(parser, p); }
186
- goto st11;
187
- st11:
166
+ goto st6;
167
+ st6:
188
168
  if ( ++p == pe )
189
- goto _out11;
190
- case 11:
191
- #line 192 "ext/http11/http11_parser.c"
169
+ goto _out6;
170
+ case 6:
171
+ #line 172 "ext/http11/http11_parser.c"
192
172
  if ( (*p) == 84 )
193
- goto st12;
173
+ goto st7;
194
174
  goto st1;
195
- st12:
175
+ st7:
196
176
  if ( ++p == pe )
197
- goto _out12;
198
- case 12:
177
+ goto _out7;
178
+ case 7:
199
179
  if ( (*p) == 84 )
200
- goto st13;
180
+ goto st8;
201
181
  goto st1;
202
- st13:
182
+ st8:
203
183
  if ( ++p == pe )
204
- goto _out13;
205
- case 13:
184
+ goto _out8;
185
+ case 8:
206
186
  if ( (*p) == 80 )
207
- goto st14;
187
+ goto st9;
208
188
  goto st1;
209
- st14:
189
+ st9:
210
190
  if ( ++p == pe )
211
- goto _out14;
212
- case 14:
191
+ goto _out9;
192
+ case 9:
213
193
  if ( (*p) == 47 )
214
- goto st15;
194
+ goto st10;
215
195
  goto st1;
216
- st15:
196
+ st10:
217
197
  if ( ++p == pe )
218
- goto _out15;
219
- case 15:
198
+ goto _out10;
199
+ case 10:
220
200
  if ( 48 <= (*p) && (*p) <= 57 )
221
- goto st16;
201
+ goto st11;
222
202
  goto st1;
223
- st16:
203
+ st11:
224
204
  if ( ++p == pe )
225
- goto _out16;
226
- case 16:
205
+ goto _out11;
206
+ case 11:
227
207
  if ( (*p) == 46 )
228
- goto st17;
208
+ goto st12;
229
209
  if ( 48 <= (*p) && (*p) <= 57 )
230
- goto st16;
210
+ goto st11;
231
211
  goto st1;
232
- st17:
212
+ st12:
233
213
  if ( ++p == pe )
234
- goto _out17;
235
- case 17:
214
+ goto _out12;
215
+ case 12:
236
216
  if ( 48 <= (*p) && (*p) <= 57 )
237
- goto st18;
217
+ goto st13;
238
218
  goto st1;
239
- st18:
219
+ st13:
240
220
  if ( ++p == pe )
241
- goto _out18;
242
- case 18:
221
+ goto _out13;
222
+ case 13:
243
223
  if ( (*p) == 13 )
244
- goto tr37;
224
+ goto tr22;
245
225
  if ( 48 <= (*p) && (*p) <= 57 )
246
- goto st18;
226
+ goto st13;
247
227
  goto st1;
248
- tr37:
228
+ tr22:
249
229
  #line 46 "ext/http11/http11_parser.rl"
250
230
  {
251
231
  assert(p - parser->mark >= 0 && "buffer overflow");
252
232
  if(parser->http_version != NULL)
253
233
  parser->http_version(parser->data, parser->mark, p - parser->mark);
254
234
  }
255
- goto st19;
256
- tr49:
235
+ goto st14;
236
+ tr34:
257
237
  #line 22 "ext/http11/http11_parser.rl"
258
238
  {
259
239
  assert(p - (parser->mark - 1) >= 0 && "buffer overflow");
@@ -263,161 +243,161 @@ tr49:
263
243
  parser->mark+1, p - (parser->mark +1));
264
244
  }
265
245
  }
266
- goto st19;
267
- st19:
246
+ goto st14;
247
+ st14:
268
248
  if ( ++p == pe )
269
- goto _out19;
270
- case 19:
271
- #line 272 "ext/http11/http11_parser.c"
249
+ goto _out14;
250
+ case 14:
251
+ #line 252 "ext/http11/http11_parser.c"
272
252
  if ( (*p) == 10 )
273
- goto st20;
253
+ goto st15;
274
254
  goto st1;
275
- st20:
255
+ st15:
276
256
  if ( ++p == pe )
277
- goto _out20;
278
- case 20:
257
+ goto _out15;
258
+ case 15:
279
259
  switch( (*p) ) {
280
- case 13: goto st21;
281
- case 33: goto tr36;
282
- case 124: goto tr36;
283
- case 126: goto tr36;
260
+ case 13: goto st16;
261
+ case 33: goto tr21;
262
+ case 124: goto tr21;
263
+ case 126: goto tr21;
284
264
  }
285
265
  if ( (*p) < 45 ) {
286
266
  if ( (*p) > 39 ) {
287
267
  if ( 42 <= (*p) && (*p) <= 43 )
288
- goto tr36;
268
+ goto tr21;
289
269
  } else if ( (*p) >= 35 )
290
- goto tr36;
270
+ goto tr21;
291
271
  } else if ( (*p) > 46 ) {
292
272
  if ( (*p) < 65 ) {
293
273
  if ( 48 <= (*p) && (*p) <= 57 )
294
- goto tr36;
274
+ goto tr21;
295
275
  } else if ( (*p) > 90 ) {
296
276
  if ( 94 <= (*p) && (*p) <= 122 )
297
- goto tr36;
277
+ goto tr21;
298
278
  } else
299
- goto tr36;
279
+ goto tr21;
300
280
  } else
301
- goto tr36;
281
+ goto tr21;
302
282
  goto st1;
303
- st21:
283
+ st16:
304
284
  if ( ++p == pe )
305
- goto _out21;
306
- case 21:
285
+ goto _out16;
286
+ case 16:
307
287
  if ( (*p) == 10 )
308
- goto tr40;
288
+ goto tr25;
309
289
  goto st1;
310
- tr40:
290
+ tr25:
311
291
  #line 52 "ext/http11/http11_parser.rl"
312
292
  {
313
293
  parser->body_start = p+1;
314
294
  if(parser->header_done != NULL)
315
295
  parser->header_done(parser->data, p, 0);
316
- goto _out53;
296
+ goto _out51;
317
297
  }
318
- goto st53;
319
- st53:
298
+ goto st51;
299
+ st51:
320
300
  if ( ++p == pe )
321
- goto _out53;
322
- case 53:
323
- #line 324 "ext/http11/http11_parser.c"
301
+ goto _out51;
302
+ case 51:
303
+ #line 304 "ext/http11/http11_parser.c"
324
304
  goto st1;
325
- tr36:
305
+ tr21:
326
306
  #line 16 "ext/http11/http11_parser.rl"
327
307
  { parser->field_start = p; }
328
- goto st22;
329
- st22:
308
+ goto st17;
309
+ st17:
330
310
  if ( ++p == pe )
331
- goto _out22;
332
- case 22:
333
- #line 334 "ext/http11/http11_parser.c"
311
+ goto _out17;
312
+ case 17:
313
+ #line 314 "ext/http11/http11_parser.c"
334
314
  switch( (*p) ) {
335
- case 33: goto st22;
336
- case 58: goto tr32;
337
- case 124: goto st22;
338
- case 126: goto st22;
315
+ case 33: goto st17;
316
+ case 58: goto tr16;
317
+ case 124: goto st17;
318
+ case 126: goto st17;
339
319
  }
340
320
  if ( (*p) < 45 ) {
341
321
  if ( (*p) > 39 ) {
342
322
  if ( 42 <= (*p) && (*p) <= 43 )
343
- goto st22;
323
+ goto st17;
344
324
  } else if ( (*p) >= 35 )
345
- goto st22;
325
+ goto st17;
346
326
  } else if ( (*p) > 46 ) {
347
327
  if ( (*p) < 65 ) {
348
328
  if ( 48 <= (*p) && (*p) <= 57 )
349
- goto st22;
329
+ goto st17;
350
330
  } else if ( (*p) > 90 ) {
351
331
  if ( 94 <= (*p) && (*p) <= 122 )
352
- goto st22;
332
+ goto st17;
353
333
  } else
354
- goto st22;
334
+ goto st17;
355
335
  } else
356
- goto st22;
336
+ goto st17;
357
337
  goto st1;
358
- tr32:
338
+ tr16:
359
339
  #line 17 "ext/http11/http11_parser.rl"
360
340
  {
361
341
  parser->field_len = (p - parser->field_start);
362
342
  }
363
- goto st23;
364
- st23:
343
+ goto st18;
344
+ st18:
365
345
  if ( ++p == pe )
366
- goto _out23;
367
- case 23:
368
- #line 369 "ext/http11/http11_parser.c"
346
+ goto _out18;
347
+ case 18:
348
+ #line 349 "ext/http11/http11_parser.c"
369
349
  if ( (*p) == 13 )
370
- goto tr49;
371
- goto tr52;
372
- tr52:
350
+ goto tr34;
351
+ goto tr37;
352
+ tr37:
373
353
  #line 21 "ext/http11/http11_parser.rl"
374
354
  { MARK(parser, p); }
375
- goto st24;
376
- st24:
355
+ goto st19;
356
+ st19:
377
357
  if ( ++p == pe )
378
- goto _out24;
379
- case 24:
380
- #line 381 "ext/http11/http11_parser.c"
358
+ goto _out19;
359
+ case 19:
360
+ #line 361 "ext/http11/http11_parser.c"
381
361
  if ( (*p) == 13 )
382
- goto tr49;
383
- goto st24;
384
- tr28:
362
+ goto tr34;
363
+ goto st19;
364
+ tr11:
385
365
  #line 14 "ext/http11/http11_parser.rl"
386
366
  {MARK(parser, p); }
387
- goto st25;
388
- st25:
367
+ goto st20;
368
+ st20:
389
369
  if ( ++p == pe )
390
- goto _out25;
391
- case 25:
392
- #line 393 "ext/http11/http11_parser.c"
370
+ goto _out20;
371
+ case 20:
372
+ #line 373 "ext/http11/http11_parser.c"
393
373
  switch( (*p) ) {
394
- case 43: goto st25;
395
- case 58: goto st26;
374
+ case 43: goto st20;
375
+ case 58: goto st21;
396
376
  }
397
377
  if ( (*p) < 48 ) {
398
378
  if ( 45 <= (*p) && (*p) <= 46 )
399
- goto st25;
379
+ goto st20;
400
380
  } else if ( (*p) > 57 ) {
401
381
  if ( (*p) > 90 ) {
402
382
  if ( 97 <= (*p) && (*p) <= 122 )
403
- goto st25;
383
+ goto st20;
404
384
  } else if ( (*p) >= 65 )
405
- goto st25;
385
+ goto st20;
406
386
  } else
407
- goto st25;
387
+ goto st20;
408
388
  goto st1;
409
- tr30:
389
+ tr13:
410
390
  #line 14 "ext/http11/http11_parser.rl"
411
391
  {MARK(parser, p); }
412
- goto st26;
413
- st26:
392
+ goto st21;
393
+ st21:
414
394
  if ( ++p == pe )
415
- goto _out26;
416
- case 26:
417
- #line 418 "ext/http11/http11_parser.c"
395
+ goto _out21;
396
+ case 21:
397
+ #line 398 "ext/http11/http11_parser.c"
418
398
  switch( (*p) ) {
419
- case 32: goto tr34;
420
- case 37: goto st27;
399
+ case 32: goto tr19;
400
+ case 37: goto st22;
421
401
  case 60: goto st1;
422
402
  case 62: goto st1;
423
403
  case 127: goto st1;
@@ -427,49 +407,49 @@ case 26:
427
407
  goto st1;
428
408
  } else if ( (*p) >= 0 )
429
409
  goto st1;
430
- goto st26;
431
- st27:
410
+ goto st21;
411
+ st22:
432
412
  if ( ++p == pe )
433
- goto _out27;
434
- case 27:
413
+ goto _out22;
414
+ case 22:
435
415
  if ( (*p) < 65 ) {
436
416
  if ( 48 <= (*p) && (*p) <= 57 )
437
- goto st28;
417
+ goto st23;
438
418
  } else if ( (*p) > 70 ) {
439
419
  if ( 97 <= (*p) && (*p) <= 102 )
440
- goto st28;
420
+ goto st23;
441
421
  } else
442
- goto st28;
422
+ goto st23;
443
423
  goto st1;
444
- st28:
424
+ st23:
445
425
  if ( ++p == pe )
446
- goto _out28;
447
- case 28:
426
+ goto _out23;
427
+ case 23:
448
428
  if ( (*p) < 65 ) {
449
429
  if ( 48 <= (*p) && (*p) <= 57 )
450
- goto st26;
430
+ goto st21;
451
431
  } else if ( (*p) > 70 ) {
452
432
  if ( 97 <= (*p) && (*p) <= 102 )
453
- goto st26;
433
+ goto st21;
454
434
  } else
455
- goto st26;
435
+ goto st21;
456
436
  goto st1;
457
- tr29:
437
+ tr12:
458
438
  #line 14 "ext/http11/http11_parser.rl"
459
439
  {MARK(parser, p); }
460
- goto st29;
461
- st29:
440
+ goto st24;
441
+ st24:
462
442
  if ( ++p == pe )
463
- goto _out29;
464
- case 29:
465
- #line 466 "ext/http11/http11_parser.c"
443
+ goto _out24;
444
+ case 24:
445
+ #line 446 "ext/http11/http11_parser.c"
466
446
  switch( (*p) ) {
467
- case 32: goto tr34;
468
- case 37: goto st31;
447
+ case 32: goto tr19;
448
+ case 37: goto st26;
469
449
  case 47: goto st1;
470
450
  case 60: goto st1;
471
451
  case 62: goto st1;
472
- case 63: goto tr43;
452
+ case 63: goto tr28;
473
453
  case 127: goto st1;
474
454
  }
475
455
  if ( (*p) > 31 ) {
@@ -477,17 +457,17 @@ case 29:
477
457
  goto st1;
478
458
  } else if ( (*p) >= 0 )
479
459
  goto st1;
480
- goto st30;
481
- st30:
460
+ goto st25;
461
+ st25:
482
462
  if ( ++p == pe )
483
- goto _out30;
484
- case 30:
463
+ goto _out25;
464
+ case 25:
485
465
  switch( (*p) ) {
486
- case 32: goto tr34;
487
- case 37: goto st31;
466
+ case 32: goto tr19;
467
+ case 37: goto st26;
488
468
  case 60: goto st1;
489
469
  case 62: goto st1;
490
- case 63: goto tr43;
470
+ case 63: goto tr28;
491
471
  case 127: goto st1;
492
472
  }
493
473
  if ( (*p) > 31 ) {
@@ -495,49 +475,49 @@ case 30:
495
475
  goto st1;
496
476
  } else if ( (*p) >= 0 )
497
477
  goto st1;
498
- goto st30;
499
- st31:
478
+ goto st25;
479
+ st26:
500
480
  if ( ++p == pe )
501
- goto _out31;
502
- case 31:
481
+ goto _out26;
482
+ case 26:
503
483
  if ( (*p) < 65 ) {
504
484
  if ( 48 <= (*p) && (*p) <= 57 )
505
- goto st32;
485
+ goto st27;
506
486
  } else if ( (*p) > 70 ) {
507
487
  if ( 97 <= (*p) && (*p) <= 102 )
508
- goto st32;
488
+ goto st27;
509
489
  } else
510
- goto st32;
490
+ goto st27;
511
491
  goto st1;
512
- st32:
492
+ st27:
513
493
  if ( ++p == pe )
514
- goto _out32;
515
- case 32:
494
+ goto _out27;
495
+ case 27:
516
496
  if ( (*p) < 65 ) {
517
497
  if ( 48 <= (*p) && (*p) <= 57 )
518
- goto st30;
498
+ goto st25;
519
499
  } else if ( (*p) > 70 ) {
520
500
  if ( 97 <= (*p) && (*p) <= 102 )
521
- goto st30;
501
+ goto st25;
522
502
  } else
523
- goto st30;
503
+ goto st25;
524
504
  goto st1;
525
- tr43:
505
+ tr28:
526
506
  #line 35 "ext/http11/http11_parser.rl"
527
507
  {
528
508
  assert(p - parser->mark >= 0 && "buffer overflow");
529
509
  if(parser->request_uri != NULL)
530
510
  parser->request_uri(parser->data, parser->mark, p - parser->mark);
531
511
  }
532
- goto st33;
533
- st33:
512
+ goto st28;
513
+ st28:
534
514
  if ( ++p == pe )
535
- goto _out33;
536
- case 33:
537
- #line 538 "ext/http11/http11_parser.c"
515
+ goto _out28;
516
+ case 28:
517
+ #line 518 "ext/http11/http11_parser.c"
538
518
  switch( (*p) ) {
539
- case 32: goto tr46;
540
- case 37: goto tr51;
519
+ case 32: goto tr31;
520
+ case 37: goto tr36;
541
521
  case 60: goto st1;
542
522
  case 62: goto st1;
543
523
  case 127: goto st1;
@@ -547,19 +527,19 @@ case 33:
547
527
  goto st1;
548
528
  } else if ( (*p) >= 0 )
549
529
  goto st1;
550
- goto tr50;
551
- tr50:
530
+ goto tr35;
531
+ tr35:
552
532
  #line 14 "ext/http11/http11_parser.rl"
553
533
  {MARK(parser, p); }
554
- goto st34;
555
- st34:
534
+ goto st29;
535
+ st29:
556
536
  if ( ++p == pe )
557
- goto _out34;
558
- case 34:
559
- #line 560 "ext/http11/http11_parser.c"
537
+ goto _out29;
538
+ case 29:
539
+ #line 540 "ext/http11/http11_parser.c"
560
540
  switch( (*p) ) {
561
- case 32: goto tr46;
562
- case 37: goto st35;
541
+ case 32: goto tr31;
542
+ case 37: goto st30;
563
543
  case 60: goto st1;
564
544
  case 62: goto st1;
565
545
  case 127: goto st1;
@@ -569,176 +549,368 @@ case 34:
569
549
  goto st1;
570
550
  } else if ( (*p) >= 0 )
571
551
  goto st1;
572
- goto st34;
573
- tr51:
552
+ goto st29;
553
+ tr36:
574
554
  #line 14 "ext/http11/http11_parser.rl"
575
555
  {MARK(parser, p); }
576
- goto st35;
577
- st35:
556
+ goto st30;
557
+ st30:
578
558
  if ( ++p == pe )
579
- goto _out35;
580
- case 35:
581
- #line 582 "ext/http11/http11_parser.c"
559
+ goto _out30;
560
+ case 30:
561
+ #line 562 "ext/http11/http11_parser.c"
582
562
  if ( (*p) < 65 ) {
583
563
  if ( 48 <= (*p) && (*p) <= 57 )
584
- goto st36;
564
+ goto st31;
585
565
  } else if ( (*p) > 70 ) {
586
566
  if ( 97 <= (*p) && (*p) <= 102 )
587
- goto st36;
567
+ goto st31;
588
568
  } else
589
- goto st36;
569
+ goto st31;
590
570
  goto st1;
591
- st36:
571
+ st31:
592
572
  if ( ++p == pe )
593
- goto _out36;
594
- case 36:
573
+ goto _out31;
574
+ case 31:
595
575
  if ( (*p) < 65 ) {
596
576
  if ( 48 <= (*p) && (*p) <= 57 )
597
- goto st34;
577
+ goto st29;
598
578
  } else if ( (*p) > 70 ) {
599
579
  if ( 97 <= (*p) && (*p) <= 102 )
580
+ goto st29;
581
+ } else
582
+ goto st29;
583
+ goto st1;
584
+ st32:
585
+ if ( ++p == pe )
586
+ goto _out32;
587
+ case 32:
588
+ switch( (*p) ) {
589
+ case 32: goto tr17;
590
+ case 36: goto st33;
591
+ case 95: goto st33;
592
+ }
593
+ if ( (*p) < 48 ) {
594
+ if ( 45 <= (*p) && (*p) <= 46 )
595
+ goto st33;
596
+ } else if ( (*p) > 57 ) {
597
+ if ( 65 <= (*p) && (*p) <= 90 )
598
+ goto st33;
599
+ } else
600
+ goto st33;
601
+ goto st1;
602
+ st33:
603
+ if ( ++p == pe )
604
+ goto _out33;
605
+ case 33:
606
+ switch( (*p) ) {
607
+ case 32: goto tr17;
608
+ case 36: goto st34;
609
+ case 95: goto st34;
610
+ }
611
+ if ( (*p) < 48 ) {
612
+ if ( 45 <= (*p) && (*p) <= 46 )
613
+ goto st34;
614
+ } else if ( (*p) > 57 ) {
615
+ if ( 65 <= (*p) && (*p) <= 90 )
600
616
  goto st34;
601
617
  } else
602
618
  goto st34;
603
619
  goto st1;
604
- tr14:
605
- #line 14 "ext/http11/http11_parser.rl"
606
- {MARK(parser, p); }
607
- goto st37;
620
+ st34:
621
+ if ( ++p == pe )
622
+ goto _out34;
623
+ case 34:
624
+ switch( (*p) ) {
625
+ case 32: goto tr17;
626
+ case 36: goto st35;
627
+ case 95: goto st35;
628
+ }
629
+ if ( (*p) < 48 ) {
630
+ if ( 45 <= (*p) && (*p) <= 46 )
631
+ goto st35;
632
+ } else if ( (*p) > 57 ) {
633
+ if ( 65 <= (*p) && (*p) <= 90 )
634
+ goto st35;
635
+ } else
636
+ goto st35;
637
+ goto st1;
638
+ st35:
639
+ if ( ++p == pe )
640
+ goto _out35;
641
+ case 35:
642
+ switch( (*p) ) {
643
+ case 32: goto tr17;
644
+ case 36: goto st36;
645
+ case 95: goto st36;
646
+ }
647
+ if ( (*p) < 48 ) {
648
+ if ( 45 <= (*p) && (*p) <= 46 )
649
+ goto st36;
650
+ } else if ( (*p) > 57 ) {
651
+ if ( 65 <= (*p) && (*p) <= 90 )
652
+ goto st36;
653
+ } else
654
+ goto st36;
655
+ goto st1;
656
+ st36:
657
+ if ( ++p == pe )
658
+ goto _out36;
659
+ case 36:
660
+ switch( (*p) ) {
661
+ case 32: goto tr17;
662
+ case 36: goto st37;
663
+ case 95: goto st37;
664
+ }
665
+ if ( (*p) < 48 ) {
666
+ if ( 45 <= (*p) && (*p) <= 46 )
667
+ goto st37;
668
+ } else if ( (*p) > 57 ) {
669
+ if ( 65 <= (*p) && (*p) <= 90 )
670
+ goto st37;
671
+ } else
672
+ goto st37;
673
+ goto st1;
608
674
  st37:
609
675
  if ( ++p == pe )
610
676
  goto _out37;
611
677
  case 37:
612
- #line 613 "ext/http11/http11_parser.c"
613
- if ( (*p) == 69 )
678
+ switch( (*p) ) {
679
+ case 32: goto tr17;
680
+ case 36: goto st38;
681
+ case 95: goto st38;
682
+ }
683
+ if ( (*p) < 48 ) {
684
+ if ( 45 <= (*p) && (*p) <= 46 )
685
+ goto st38;
686
+ } else if ( (*p) > 57 ) {
687
+ if ( 65 <= (*p) && (*p) <= 90 )
688
+ goto st38;
689
+ } else
614
690
  goto st38;
615
691
  goto st1;
616
692
  st38:
617
693
  if ( ++p == pe )
618
694
  goto _out38;
619
695
  case 38:
620
- if ( (*p) == 84 )
621
- goto st7;
696
+ switch( (*p) ) {
697
+ case 32: goto tr17;
698
+ case 36: goto st39;
699
+ case 95: goto st39;
700
+ }
701
+ if ( (*p) < 48 ) {
702
+ if ( 45 <= (*p) && (*p) <= 46 )
703
+ goto st39;
704
+ } else if ( (*p) > 57 ) {
705
+ if ( 65 <= (*p) && (*p) <= 90 )
706
+ goto st39;
707
+ } else
708
+ goto st39;
622
709
  goto st1;
623
- tr15:
624
- #line 14 "ext/http11/http11_parser.rl"
625
- {MARK(parser, p); }
626
- goto st39;
627
710
  st39:
628
711
  if ( ++p == pe )
629
712
  goto _out39;
630
713
  case 39:
631
- #line 632 "ext/http11/http11_parser.c"
632
- if ( (*p) == 69 )
714
+ switch( (*p) ) {
715
+ case 32: goto tr17;
716
+ case 36: goto st40;
717
+ case 95: goto st40;
718
+ }
719
+ if ( (*p) < 48 ) {
720
+ if ( 45 <= (*p) && (*p) <= 46 )
721
+ goto st40;
722
+ } else if ( (*p) > 57 ) {
723
+ if ( 65 <= (*p) && (*p) <= 90 )
724
+ goto st40;
725
+ } else
633
726
  goto st40;
634
727
  goto st1;
635
728
  st40:
636
729
  if ( ++p == pe )
637
730
  goto _out40;
638
731
  case 40:
639
- if ( (*p) == 65 )
732
+ switch( (*p) ) {
733
+ case 32: goto tr17;
734
+ case 36: goto st41;
735
+ case 95: goto st41;
736
+ }
737
+ if ( (*p) < 48 ) {
738
+ if ( 45 <= (*p) && (*p) <= 46 )
739
+ goto st41;
740
+ } else if ( (*p) > 57 ) {
741
+ if ( 65 <= (*p) && (*p) <= 90 )
742
+ goto st41;
743
+ } else
640
744
  goto st41;
641
745
  goto st1;
642
746
  st41:
643
747
  if ( ++p == pe )
644
748
  goto _out41;
645
749
  case 41:
646
- if ( (*p) == 68 )
647
- goto st7;
750
+ switch( (*p) ) {
751
+ case 32: goto tr17;
752
+ case 36: goto st42;
753
+ case 95: goto st42;
754
+ }
755
+ if ( (*p) < 48 ) {
756
+ if ( 45 <= (*p) && (*p) <= 46 )
757
+ goto st42;
758
+ } else if ( (*p) > 57 ) {
759
+ if ( 65 <= (*p) && (*p) <= 90 )
760
+ goto st42;
761
+ } else
762
+ goto st42;
648
763
  goto st1;
649
- tr16:
650
- #line 14 "ext/http11/http11_parser.rl"
651
- {MARK(parser, p); }
652
- goto st42;
653
764
  st42:
654
765
  if ( ++p == pe )
655
766
  goto _out42;
656
767
  case 42:
657
- #line 658 "ext/http11/http11_parser.c"
658
- if ( (*p) == 80 )
768
+ switch( (*p) ) {
769
+ case 32: goto tr17;
770
+ case 36: goto st43;
771
+ case 95: goto st43;
772
+ }
773
+ if ( (*p) < 48 ) {
774
+ if ( 45 <= (*p) && (*p) <= 46 )
775
+ goto st43;
776
+ } else if ( (*p) > 57 ) {
777
+ if ( 65 <= (*p) && (*p) <= 90 )
778
+ goto st43;
779
+ } else
659
780
  goto st43;
660
781
  goto st1;
661
782
  st43:
662
783
  if ( ++p == pe )
663
784
  goto _out43;
664
785
  case 43:
665
- if ( (*p) == 84 )
786
+ switch( (*p) ) {
787
+ case 32: goto tr17;
788
+ case 36: goto st44;
789
+ case 95: goto st44;
790
+ }
791
+ if ( (*p) < 48 ) {
792
+ if ( 45 <= (*p) && (*p) <= 46 )
793
+ goto st44;
794
+ } else if ( (*p) > 57 ) {
795
+ if ( 65 <= (*p) && (*p) <= 90 )
796
+ goto st44;
797
+ } else
666
798
  goto st44;
667
799
  goto st1;
668
800
  st44:
669
801
  if ( ++p == pe )
670
802
  goto _out44;
671
803
  case 44:
672
- if ( (*p) == 73 )
804
+ switch( (*p) ) {
805
+ case 32: goto tr17;
806
+ case 36: goto st45;
807
+ case 95: goto st45;
808
+ }
809
+ if ( (*p) < 48 ) {
810
+ if ( 45 <= (*p) && (*p) <= 46 )
811
+ goto st45;
812
+ } else if ( (*p) > 57 ) {
813
+ if ( 65 <= (*p) && (*p) <= 90 )
814
+ goto st45;
815
+ } else
673
816
  goto st45;
674
817
  goto st1;
675
818
  st45:
676
819
  if ( ++p == pe )
677
820
  goto _out45;
678
821
  case 45:
679
- if ( (*p) == 79 )
822
+ switch( (*p) ) {
823
+ case 32: goto tr17;
824
+ case 36: goto st46;
825
+ case 95: goto st46;
826
+ }
827
+ if ( (*p) < 48 ) {
828
+ if ( 45 <= (*p) && (*p) <= 46 )
829
+ goto st46;
830
+ } else if ( (*p) > 57 ) {
831
+ if ( 65 <= (*p) && (*p) <= 90 )
832
+ goto st46;
833
+ } else
680
834
  goto st46;
681
835
  goto st1;
682
836
  st46:
683
837
  if ( ++p == pe )
684
838
  goto _out46;
685
839
  case 46:
686
- if ( (*p) == 78 )
840
+ switch( (*p) ) {
841
+ case 32: goto tr17;
842
+ case 36: goto st47;
843
+ case 95: goto st47;
844
+ }
845
+ if ( (*p) < 48 ) {
846
+ if ( 45 <= (*p) && (*p) <= 46 )
847
+ goto st47;
848
+ } else if ( (*p) > 57 ) {
849
+ if ( 65 <= (*p) && (*p) <= 90 )
850
+ goto st47;
851
+ } else
687
852
  goto st47;
688
853
  goto st1;
689
854
  st47:
690
855
  if ( ++p == pe )
691
856
  goto _out47;
692
857
  case 47:
693
- if ( (*p) == 83 )
694
- goto st7;
858
+ switch( (*p) ) {
859
+ case 32: goto tr17;
860
+ case 36: goto st48;
861
+ case 95: goto st48;
862
+ }
863
+ if ( (*p) < 48 ) {
864
+ if ( 45 <= (*p) && (*p) <= 46 )
865
+ goto st48;
866
+ } else if ( (*p) > 57 ) {
867
+ if ( 65 <= (*p) && (*p) <= 90 )
868
+ goto st48;
869
+ } else
870
+ goto st48;
695
871
  goto st1;
696
- tr17:
697
- #line 14 "ext/http11/http11_parser.rl"
698
- {MARK(parser, p); }
699
- goto st48;
700
872
  st48:
701
873
  if ( ++p == pe )
702
874
  goto _out48;
703
875
  case 48:
704
- #line 705 "ext/http11/http11_parser.c"
705
876
  switch( (*p) ) {
706
- case 79: goto st49;
707
- case 85: goto st38;
877
+ case 32: goto tr17;
878
+ case 36: goto st49;
879
+ case 95: goto st49;
708
880
  }
881
+ if ( (*p) < 48 ) {
882
+ if ( 45 <= (*p) && (*p) <= 46 )
883
+ goto st49;
884
+ } else if ( (*p) > 57 ) {
885
+ if ( 65 <= (*p) && (*p) <= 90 )
886
+ goto st49;
887
+ } else
888
+ goto st49;
709
889
  goto st1;
710
890
  st49:
711
891
  if ( ++p == pe )
712
892
  goto _out49;
713
893
  case 49:
714
- if ( (*p) == 83 )
715
- goto st38;
894
+ switch( (*p) ) {
895
+ case 32: goto tr17;
896
+ case 36: goto st50;
897
+ case 95: goto st50;
898
+ }
899
+ if ( (*p) < 48 ) {
900
+ if ( 45 <= (*p) && (*p) <= 46 )
901
+ goto st50;
902
+ } else if ( (*p) > 57 ) {
903
+ if ( 65 <= (*p) && (*p) <= 90 )
904
+ goto st50;
905
+ } else
906
+ goto st50;
716
907
  goto st1;
717
- tr18:
718
- #line 14 "ext/http11/http11_parser.rl"
719
- {MARK(parser, p); }
720
- goto st50;
721
908
  st50:
722
909
  if ( ++p == pe )
723
910
  goto _out50;
724
911
  case 50:
725
- #line 726 "ext/http11/http11_parser.c"
726
- if ( (*p) == 82 )
727
- goto st51;
728
- goto st1;
729
- st51:
730
- if ( ++p == pe )
731
- goto _out51;
732
- case 51:
733
- if ( (*p) == 65 )
734
- goto st52;
735
- goto st1;
736
- st52:
737
- if ( ++p == pe )
738
- goto _out52;
739
- case 52:
740
- if ( (*p) == 67 )
741
- goto st6;
912
+ if ( (*p) == 32 )
913
+ goto tr17;
742
914
  goto st1;
743
915
  }
744
916
  _out1: cs = 1; goto _out;
@@ -757,12 +929,12 @@ case 52:
757
929
  _out14: cs = 14; goto _out;
758
930
  _out15: cs = 15; goto _out;
759
931
  _out16: cs = 16; goto _out;
932
+ _out51: cs = 51; goto _out;
760
933
  _out17: cs = 17; goto _out;
761
934
  _out18: cs = 18; goto _out;
762
935
  _out19: cs = 19; goto _out;
763
936
  _out20: cs = 20; goto _out;
764
937
  _out21: cs = 21; goto _out;
765
- _out53: cs = 53; goto _out;
766
938
  _out22: cs = 22; goto _out;
767
939
  _out23: cs = 23; goto _out;
768
940
  _out24: cs = 24; goto _out;
@@ -792,8 +964,6 @@ case 52:
792
964
  _out48: cs = 48; goto _out;
793
965
  _out49: cs = 49; goto _out;
794
966
  _out50: cs = 50; goto _out;
795
- _out51: cs = 51; goto _out;
796
- _out52: cs = 52; goto _out;
797
967
 
798
968
  _out: {}
799
969
  }
@@ -804,7 +974,7 @@ case 52:
804
974
  if(parser->body_start) {
805
975
  /* final \r\n combo encountered so stop right here */
806
976
 
807
- #line 808 "ext/http11/http11_parser.c"
977
+ #line 978 "ext/http11/http11_parser.c"
808
978
  #line 140 "ext/http11/http11_parser.rl"
809
979
  parser->nread++;
810
980
  }
@@ -817,7 +987,7 @@ int http_parser_finish(http_parser *parser)
817
987
  int cs = parser->cs;
818
988
 
819
989
 
820
- #line 821 "ext/http11/http11_parser.c"
990
+ #line 991 "ext/http11/http11_parser.c"
821
991
  #line 151 "ext/http11/http11_parser.rl"
822
992
 
823
993
  parser->cs = cs;