| 1 |
Invalid requests |
| 2 |
================ |
| 3 |
|
| 4 |
### ICE protocol and GET method |
| 5 |
|
| 6 |
<!-- meta={"type": "request"} --> |
| 7 |
```http |
| 8 |
GET /music/sweet/music ICE/1.0 |
| 9 |
Host: example.com |
| 10 |
|
| 11 |
|
| 12 |
``` |
| 13 |
|
| 14 |
```log |
| 15 |
off=0 message begin |
| 16 |
off=0 len=3 span[method]="GET" |
| 17 |
off=3 method complete |
| 18 |
off=4 len=18 span[url]="/music/sweet/music" |
| 19 |
off=23 url complete |
| 20 |
off=27 error code=8 reason="Expected SOURCE method for ICE/x.x request" |
| 21 |
``` |
| 22 |
|
| 23 |
### ICE protocol, but not really |
| 24 |
|
| 25 |
<!-- meta={"type": "request"} --> |
| 26 |
```http |
| 27 |
GET /music/sweet/music IHTTP/1.0 |
| 28 |
Host: example.com |
| 29 |
|
| 30 |
|
| 31 |
``` |
| 32 |
|
| 33 |
```log |
| 34 |
off=0 message begin |
| 35 |
off=0 len=3 span[method]="GET" |
| 36 |
off=3 method complete |
| 37 |
off=4 len=18 span[url]="/music/sweet/music" |
| 38 |
off=23 url complete |
| 39 |
off=24 error code=8 reason="Expected HTTP/" |
| 40 |
``` |
| 41 |
|
| 42 |
### RTSP protocol and PUT method |
| 43 |
|
| 44 |
<!-- meta={"type": "request"} --> |
| 45 |
```http |
| 46 |
PUT /music/sweet/music RTSP/1.0 |
| 47 |
Host: example.com |
| 48 |
|
| 49 |
|
| 50 |
``` |
| 51 |
|
| 52 |
```log |
| 53 |
off=0 message begin |
| 54 |
off=0 len=3 span[method]="PUT" |
| 55 |
off=3 method complete |
| 56 |
off=4 len=18 span[url]="/music/sweet/music" |
| 57 |
off=23 url complete |
| 58 |
off=28 error code=8 reason="Invalid method for RTSP/x.x request" |
| 59 |
``` |
| 60 |
|
| 61 |
### HTTP protocol and ANNOUNCE method |
| 62 |
|
| 63 |
<!-- meta={"type": "request"} --> |
| 64 |
```http |
| 65 |
ANNOUNCE /music/sweet/music HTTP/1.0 |
| 66 |
Host: example.com |
| 67 |
|
| 68 |
|
| 69 |
``` |
| 70 |
|
| 71 |
```log |
| 72 |
off=0 message begin |
| 73 |
off=0 len=8 span[method]="ANNOUNCE" |
| 74 |
off=8 method complete |
| 75 |
off=9 len=18 span[url]="/music/sweet/music" |
| 76 |
off=28 url complete |
| 77 |
off=33 error code=8 reason="Invalid method for HTTP/x.x request" |
| 78 |
``` |
| 79 |
|
| 80 |
### Headers separated by CR |
| 81 |
|
| 82 |
<!-- meta={"type": "request"} --> |
| 83 |
```http |
| 84 |
GET / HTTP/1.1 |
| 85 |
Foo: 1\rBar: 2 |
| 86 |
|
| 87 |
|
| 88 |
``` |
| 89 |
|
| 90 |
```log |
| 91 |
off=0 message begin |
| 92 |
off=0 len=3 span[method]="GET" |
| 93 |
off=3 method complete |
| 94 |
off=4 len=1 span[url]="/" |
| 95 |
off=6 url complete |
| 96 |
off=11 len=3 span[version]="1.1" |
| 97 |
off=14 version complete |
| 98 |
off=16 len=3 span[header_field]="Foo" |
| 99 |
off=20 header_field complete |
| 100 |
off=21 len=1 span[header_value]="1" |
| 101 |
off=23 error code=3 reason="Missing expected LF after header value" |
| 102 |
``` |
| 103 |
|
| 104 |
### Headers separated by LF |
| 105 |
|
| 106 |
<!-- meta={"type": "request"} --> |
| 107 |
```http |
| 108 |
POST / HTTP/1.1 |
| 109 |
Host: localhost:5000 |
| 110 |
x:x\nTransfer-Encoding: chunked |
| 111 |
|
| 112 |
1 |
| 113 |
A |
| 114 |
0 |
| 115 |
|
| 116 |
``` |
| 117 |
|
| 118 |
```log |
| 119 |
off=0 message begin |
| 120 |
off=0 len=4 span[method]="POST" |
| 121 |
off=4 method complete |
| 122 |
off=5 len=1 span[url]="/" |
| 123 |
off=7 url complete |
| 124 |
off=12 len=3 span[version]="1.1" |
| 125 |
off=15 version complete |
| 126 |
off=17 len=4 span[header_field]="Host" |
| 127 |
off=22 header_field complete |
| 128 |
off=23 len=14 span[header_value]="localhost:5000" |
| 129 |
off=39 header_value complete |
| 130 |
off=39 len=1 span[header_field]="x" |
| 131 |
off=41 header_field complete |
| 132 |
off=41 len=1 span[header_value]="x" |
| 133 |
off=42 error code=25 reason="Missing expected CR after header value" |
| 134 |
``` |
| 135 |
|
| 136 |
### Headers separated by dummy characters |
| 137 |
|
| 138 |
<!-- meta={"type": "request"} --> |
| 139 |
```http |
| 140 |
GET / HTTP/1.1 |
| 141 |
Connection: close |
| 142 |
Host: a |
| 143 |
\rZGET /evil: HTTP/1.1 |
| 144 |
Host: a |
| 145 |
|
| 146 |
``` |
| 147 |
|
| 148 |
```log |
| 149 |
off=0 message begin |
| 150 |
off=0 len=3 span[method]="GET" |
| 151 |
off=3 method complete |
| 152 |
off=4 len=1 span[url]="/" |
| 153 |
off=6 url complete |
| 154 |
off=11 len=3 span[version]="1.1" |
| 155 |
off=14 version complete |
| 156 |
off=16 len=10 span[header_field]="Connection" |
| 157 |
off=27 header_field complete |
| 158 |
off=28 len=5 span[header_value]="close" |
| 159 |
off=35 header_value complete |
| 160 |
off=35 len=4 span[header_field]="Host" |
| 161 |
off=40 header_field complete |
| 162 |
off=41 len=1 span[header_value]="a" |
| 163 |
off=44 header_value complete |
| 164 |
off=45 error code=2 reason="Expected LF after headers" |
| 165 |
``` |
| 166 |
|
| 167 |
|
| 168 |
### Headers separated by dummy characters (lenient) |
| 169 |
|
| 170 |
<!-- meta={"type": "request-lenient-optional-lf-after-cr"} --> |
| 171 |
```http |
| 172 |
GET / HTTP/1.1 |
| 173 |
Connection: close |
| 174 |
Host: a |
| 175 |
\rZGET /evil: HTTP/1.1 |
| 176 |
Host: a |
| 177 |
|
| 178 |
``` |
| 179 |
|
| 180 |
```log |
| 181 |
off=0 message begin |
| 182 |
off=0 len=3 span[method]="GET" |
| 183 |
off=3 method complete |
| 184 |
off=4 len=1 span[url]="/" |
| 185 |
off=6 url complete |
| 186 |
off=11 len=3 span[version]="1.1" |
| 187 |
off=14 version complete |
| 188 |
off=16 len=10 span[header_field]="Connection" |
| 189 |
off=27 header_field complete |
| 190 |
off=28 len=5 span[header_value]="close" |
| 191 |
off=35 header_value complete |
| 192 |
off=35 len=4 span[header_field]="Host" |
| 193 |
off=40 header_field complete |
| 194 |
off=41 len=1 span[header_value]="a" |
| 195 |
off=44 header_value complete |
| 196 |
off=45 headers complete method=1 v=1/1 flags=2 content_length=0 |
| 197 |
off=45 message complete |
| 198 |
off=46 error code=5 reason="Data after `Connection: close`" |
| 199 |
``` |
| 200 |
|
| 201 |
### Empty headers separated by CR |
| 202 |
|
| 203 |
<!-- meta={"type": "request" } --> |
| 204 |
```http |
| 205 |
POST / HTTP/1.1 |
| 206 |
Connection: Close |
| 207 |
Host: localhost:5000 |
| 208 |
x:\rTransfer-Encoding: chunked |
| 209 |
|
| 210 |
1 |
| 211 |
A |
| 212 |
0 |
| 213 |
|
| 214 |
``` |
| 215 |
|
| 216 |
```log |
| 217 |
off=0 message begin |
| 218 |
off=0 len=4 span[method]="POST" |
| 219 |
off=4 method complete |
| 220 |
off=5 len=1 span[url]="/" |
| 221 |
off=7 url complete |
| 222 |
off=12 len=3 span[version]="1.1" |
| 223 |
off=15 version complete |
| 224 |
off=17 len=10 span[header_field]="Connection" |
| 225 |
off=28 header_field complete |
| 226 |
off=29 len=5 span[header_value]="Close" |
| 227 |
off=36 header_value complete |
| 228 |
off=36 len=4 span[header_field]="Host" |
| 229 |
off=41 header_field complete |
| 230 |
off=42 len=14 span[header_value]="localhost:5000" |
| 231 |
off=58 header_value complete |
| 232 |
off=58 len=1 span[header_field]="x" |
| 233 |
off=60 header_field complete |
| 234 |
off=61 error code=2 reason="Expected LF after CR" |
| 235 |
``` |
| 236 |
|
| 237 |
### Empty headers separated by LF |
| 238 |
|
| 239 |
<!-- meta={"type": "request"} --> |
| 240 |
```http |
| 241 |
POST / HTTP/1.1 |
| 242 |
Host: localhost:5000 |
| 243 |
x:\nTransfer-Encoding: chunked |
| 244 |
|
| 245 |
1 |
| 246 |
A |
| 247 |
0 |
| 248 |
|
| 249 |
``` |
| 250 |
|
| 251 |
```log |
| 252 |
off=0 message begin |
| 253 |
off=0 len=4 span[method]="POST" |
| 254 |
off=4 method complete |
| 255 |
off=5 len=1 span[url]="/" |
| 256 |
off=7 url complete |
| 257 |
off=12 len=3 span[version]="1.1" |
| 258 |
off=15 version complete |
| 259 |
off=17 len=4 span[header_field]="Host" |
| 260 |
off=22 header_field complete |
| 261 |
off=23 len=14 span[header_value]="localhost:5000" |
| 262 |
off=39 header_value complete |
| 263 |
off=39 len=1 span[header_field]="x" |
| 264 |
off=41 header_field complete |
| 265 |
off=42 error code=10 reason="Invalid header value char" |
| 266 |
``` |
| 267 |
|
| 268 |
### Invalid header token #1 |
| 269 |
|
| 270 |
<!-- meta={"type": "request", "noScan": true} --> |
| 271 |
```http |
| 272 |
GET / HTTP/1.1 |
| 273 |
Fo@: Failure |
| 274 |
|
| 275 |
|
| 276 |
``` |
| 277 |
|
| 278 |
```log |
| 279 |
off=0 message begin |
| 280 |
off=0 len=3 span[method]="GET" |
| 281 |
off=3 method complete |
| 282 |
off=4 len=1 span[url]="/" |
| 283 |
off=6 url complete |
| 284 |
off=11 len=3 span[version]="1.1" |
| 285 |
off=14 version complete |
| 286 |
off=18 error code=10 reason="Invalid header token" |
| 287 |
``` |
| 288 |
|
| 289 |
### Invalid header token #2 |
| 290 |
|
| 291 |
<!-- meta={"type": "request", "noScan": true} --> |
| 292 |
```http |
| 293 |
GET / HTTP/1.1 |
| 294 |
Foo\01\test: Bar |
| 295 |
|
| 296 |
|
| 297 |
``` |
| 298 |
|
| 299 |
```log |
| 300 |
off=0 message begin |
| 301 |
off=0 len=3 span[method]="GET" |
| 302 |
off=3 method complete |
| 303 |
off=4 len=1 span[url]="/" |
| 304 |
off=6 url complete |
| 305 |
off=11 len=3 span[version]="1.1" |
| 306 |
off=14 version complete |
| 307 |
off=19 error code=10 reason="Invalid header token" |
| 308 |
``` |
| 309 |
|
| 310 |
### Invalid header token #3 |
| 311 |
|
| 312 |
<!-- meta={"type": "request", "noScan": true} --> |
| 313 |
```http |
| 314 |
GET / HTTP/1.1 |
| 315 |
: Bar |
| 316 |
|
| 317 |
|
| 318 |
``` |
| 319 |
|
| 320 |
```log |
| 321 |
off=0 message begin |
| 322 |
off=0 len=3 span[method]="GET" |
| 323 |
off=3 method complete |
| 324 |
off=4 len=1 span[url]="/" |
| 325 |
off=6 url complete |
| 326 |
off=11 len=3 span[version]="1.1" |
| 327 |
off=14 version complete |
| 328 |
off=16 error code=10 reason="Invalid header token" |
| 329 |
``` |
| 330 |
|
| 331 |
### Invalid method |
| 332 |
|
| 333 |
<!-- meta={"type": "request"} --> |
| 334 |
```http |
| 335 |
MKCOLA / HTTP/1.1 |
| 336 |
|
| 337 |
|
| 338 |
``` |
| 339 |
|
| 340 |
```log |
| 341 |
off=0 message begin |
| 342 |
off=0 len=5 span[method]="MKCOL" |
| 343 |
off=5 method complete |
| 344 |
off=5 error code=6 reason="Expected space after method" |
| 345 |
``` |
| 346 |
|
| 347 |
### Illegal header field name line folding |
| 348 |
|
| 349 |
<!-- meta={"type": "request", "noScan": true} --> |
| 350 |
```http |
| 351 |
GET / HTTP/1.1 |
| 352 |
name |
| 353 |
: value |
| 354 |
|
| 355 |
|
| 356 |
``` |
| 357 |
|
| 358 |
```log |
| 359 |
off=0 message begin |
| 360 |
off=0 len=3 span[method]="GET" |
| 361 |
off=3 method complete |
| 362 |
off=4 len=1 span[url]="/" |
| 363 |
off=6 url complete |
| 364 |
off=11 len=3 span[version]="1.1" |
| 365 |
off=14 version complete |
| 366 |
off=20 error code=10 reason="Invalid header token" |
| 367 |
``` |
| 368 |
|
| 369 |
### Corrupted Connection header |
| 370 |
|
| 371 |
<!-- meta={"type": "request", "noScan": true} --> |
| 372 |
```http |
| 373 |
GET / HTTP/1.1 |
| 374 |
Host: www.example.com |
| 375 |
Connection\r\033\065\325eep-Alive |
| 376 |
Accept-Encoding: gzip |
| 377 |
|
| 378 |
|
| 379 |
``` |
| 380 |
|
| 381 |
```log |
| 382 |
off=0 message begin |
| 383 |
off=0 len=3 span[method]="GET" |
| 384 |
off=3 method complete |
| 385 |
off=4 len=1 span[url]="/" |
| 386 |
off=6 url complete |
| 387 |
off=11 len=3 span[version]="1.1" |
| 388 |
off=14 version complete |
| 389 |
off=16 len=4 span[header_field]="Host" |
| 390 |
off=21 header_field complete |
| 391 |
off=22 len=15 span[header_value]="www.example.com" |
| 392 |
off=39 header_value complete |
| 393 |
off=49 error code=10 reason="Invalid header token" |
| 394 |
``` |
| 395 |
|
| 396 |
### Corrupted header name |
| 397 |
|
| 398 |
<!-- meta={"type": "request", "noScan": true} --> |
| 399 |
```http |
| 400 |
GET / HTTP/1.1 |
| 401 |
Host: www.example.com |
| 402 |
X-Some-Header\r\033\065\325eep-Alive |
| 403 |
Accept-Encoding: gzip |
| 404 |
|
| 405 |
|
| 406 |
``` |
| 407 |
|
| 408 |
```log |
| 409 |
off=0 message begin |
| 410 |
off=0 len=3 span[method]="GET" |
| 411 |
off=3 method complete |
| 412 |
off=4 len=1 span[url]="/" |
| 413 |
off=6 url complete |
| 414 |
off=11 len=3 span[version]="1.1" |
| 415 |
off=14 version complete |
| 416 |
off=16 len=4 span[header_field]="Host" |
| 417 |
off=21 header_field complete |
| 418 |
off=22 len=15 span[header_value]="www.example.com" |
| 419 |
off=39 header_value complete |
| 420 |
off=52 error code=10 reason="Invalid header token" |
| 421 |
``` |
| 422 |
|
| 423 |
### Missing CR between headers |
| 424 |
|
| 425 |
<!-- meta={"type": "request", "noScan": true} --> |
| 426 |
|
| 427 |
```http |
| 428 |
GET / HTTP/1.1 |
| 429 |
Host: localhost |
| 430 |
Dummy: x\nContent-Length: 23 |
| 431 |
|
| 432 |
GET / HTTP/1.1 |
| 433 |
Dummy: GET /admin HTTP/1.1 |
| 434 |
Host: localhost |
| 435 |
|
| 436 |
|
| 437 |
``` |
| 438 |
|
| 439 |
```log |
| 440 |
off=0 message begin |
| 441 |
off=0 len=3 span[method]="GET" |
| 442 |
off=3 method complete |
| 443 |
off=4 len=1 span[url]="/" |
| 444 |
off=6 url complete |
| 445 |
off=11 len=3 span[version]="1.1" |
| 446 |
off=14 version complete |
| 447 |
off=16 len=4 span[header_field]="Host" |
| 448 |
off=21 header_field complete |
| 449 |
off=22 len=9 span[header_value]="localhost" |
| 450 |
off=33 header_value complete |
| 451 |
off=33 len=5 span[header_field]="Dummy" |
| 452 |
off=39 header_field complete |
| 453 |
off=40 len=1 span[header_value]="x" |
| 454 |
off=41 error code=25 reason="Missing expected CR after header value" |
| 455 |
``` |
| 456 |
|
| 457 |
### Invalid HTTP version |
| 458 |
|
| 459 |
<!-- meta={"type": "request", "noScan": true} --> |
| 460 |
```http |
| 461 |
GET / HTTP/5.6 |
| 462 |
``` |
| 463 |
|
| 464 |
```log |
| 465 |
off=0 message begin |
| 466 |
off=0 len=3 span[method]="GET" |
| 467 |
off=3 method complete |
| 468 |
off=4 len=1 span[url]="/" |
| 469 |
off=6 url complete |
| 470 |
off=11 len=3 span[version]="5.6" |
| 471 |
off=14 error code=9 reason="Invalid HTTP version" |
| 472 |
``` |
| 473 |
|
| 474 |
## Invalid space after start line |
| 475 |
|
| 476 |
<!-- meta={"type": "request"} --> |
| 477 |
```http |
| 478 |
GET / HTTP/1.1 |
| 479 |
Host: foo |
| 480 |
``` |
| 481 |
|
| 482 |
```log |
| 483 |
off=0 message begin |
| 484 |
off=0 len=3 span[method]="GET" |
| 485 |
off=3 method complete |
| 486 |
off=4 len=1 span[url]="/" |
| 487 |
off=6 url complete |
| 488 |
off=11 len=3 span[version]="1.1" |
| 489 |
off=14 version complete |
| 490 |
off=17 error code=30 reason="Unexpected space after start line" |
| 491 |
``` |
| 492 |
|
| 493 |
|
| 494 |
### Only LFs present |
| 495 |
|
| 496 |
<!-- meta={"type": "request"} --> |
| 497 |
```http |
| 498 |
POST / HTTP/1.1\n\ |
| 499 |
Transfer-Encoding: chunked\n\ |
| 500 |
Trailer: Baz |
| 501 |
Foo: abc\n\ |
| 502 |
Bar: def\n\ |
| 503 |
\n\ |
| 504 |
1\n\ |
| 505 |
A\n\ |
| 506 |
1;abc\n\ |
| 507 |
B\n\ |
| 508 |
1;def=ghi\n\ |
| 509 |
C\n\ |
| 510 |
1;jkl="mno"\n\ |
| 511 |
D\n\ |
| 512 |
0\n\ |
| 513 |
\n\ |
| 514 |
Baz: ghi\n\ |
| 515 |
\n\ |
| 516 |
``` |
| 517 |
|
| 518 |
```log |
| 519 |
off=0 message begin |
| 520 |
off=0 len=4 span[method]="POST" |
| 521 |
off=4 method complete |
| 522 |
off=5 len=1 span[url]="/" |
| 523 |
off=7 url complete |
| 524 |
off=12 len=3 span[version]="1.1" |
| 525 |
off=15 version complete |
| 526 |
off=16 error code=9 reason="Expected CRLF after version" |
| 527 |
``` |
| 528 |
|
| 529 |
### Only LFs present (lenient) |
| 530 |
|
| 531 |
<!-- meta={"type": "request-lenient-all"} --> |
| 532 |
```http |
| 533 |
POST / HTTP/1.1\n\ |
| 534 |
Transfer-Encoding: chunked\n\ |
| 535 |
Trailer: Baz |
| 536 |
Foo: abc\n\ |
| 537 |
Bar: def\n\ |
| 538 |
\n\ |
| 539 |
1\n\ |
| 540 |
A\n\ |
| 541 |
1;abc\n\ |
| 542 |
B\n\ |
| 543 |
1;def=ghi\n\ |
| 544 |
C\n\ |
| 545 |
1;jkl="mno"\n\ |
| 546 |
D\n\ |
| 547 |
0\n\ |
| 548 |
\n\ |
| 549 |
Baz: ghi\n\ |
| 550 |
\n |
| 551 |
``` |
| 552 |
|
| 553 |
```log |
| 554 |
off=0 message begin |
| 555 |
off=0 len=4 span[method]="POST" |
| 556 |
off=4 method complete |
| 557 |
off=5 len=1 span[url]="/" |
| 558 |
off=7 url complete |
| 559 |
off=12 len=3 span[version]="1.1" |
| 560 |
off=15 version complete |
| 561 |
off=16 len=17 span[header_field]="Transfer-Encoding" |
| 562 |
off=34 header_field complete |
| 563 |
off=35 len=7 span[header_value]="chunked" |
| 564 |
off=43 header_value complete |
| 565 |
off=43 len=7 span[header_field]="Trailer" |
| 566 |
off=51 header_field complete |
| 567 |
off=52 len=3 span[header_value]="Baz" |
| 568 |
off=57 header_value complete |
| 569 |
off=57 len=3 span[header_field]="Foo" |
| 570 |
off=61 header_field complete |
| 571 |
off=62 len=3 span[header_value]="abc" |
| 572 |
off=66 header_value complete |
| 573 |
off=66 len=3 span[header_field]="Bar" |
| 574 |
off=70 header_field complete |
| 575 |
off=71 len=3 span[header_value]="def" |
| 576 |
off=75 header_value complete |
| 577 |
off=76 headers complete method=3 v=1/1 flags=208 content_length=0 |
| 578 |
off=78 chunk header len=1 |
| 579 |
off=78 len=1 span[body]="A" |
| 580 |
off=80 chunk complete |
| 581 |
off=82 len=3 span[chunk_extension_name]="abc" |
| 582 |
off=85 chunk_extension_name complete |
| 583 |
off=86 chunk header len=1 |
| 584 |
off=86 len=1 span[body]="B" |
| 585 |
off=88 chunk complete |
| 586 |
off=90 len=3 span[chunk_extension_name]="def" |
| 587 |
off=94 chunk_extension_name complete |
| 588 |
off=94 len=3 span[chunk_extension_value]="ghi" |
| 589 |
off=97 chunk_extension_value complete |
| 590 |
off=98 chunk header len=1 |
| 591 |
off=98 len=1 span[body]="C" |
| 592 |
off=100 chunk complete |
| 593 |
off=102 len=3 span[chunk_extension_name]="jkl" |
| 594 |
off=106 chunk_extension_name complete |
| 595 |
off=106 len=5 span[chunk_extension_value]=""mno"" |
| 596 |
off=111 chunk_extension_value complete |
| 597 |
off=112 chunk header len=1 |
| 598 |
off=112 len=1 span[body]="D" |
| 599 |
off=114 chunk complete |
| 600 |
off=117 chunk header len=0 |
| 601 |
off=117 len=3 span[header_field]="Baz" |
| 602 |
off=121 header_field complete |
| 603 |
off=122 len=3 span[header_value]="ghi" |
| 604 |
off=126 header_value complete |
| 605 |
off=127 chunk complete |
| 606 |
off=127 message complete |
| 607 |
``` |
| 608 |
|
| 609 |
### Spaces before headers |
| 610 |
|
| 611 |
<!-- meta={ "type": "request" } --> |
| 612 |
|
| 613 |
```http |
| 614 |
POST /hello HTTP/1.1 |
| 615 |
Host: localhost |
| 616 |
Foo: bar |
| 617 |
Content-Length: 38 |
| 618 |
|
| 619 |
GET /bye HTTP/1.1 |
| 620 |
Host: localhost |
| 621 |
|
| 622 |
|
| 623 |
``` |
| 624 |
|
| 625 |
```log |
| 626 |
off=0 message begin |
| 627 |
off=0 len=4 span[method]="POST" |
| 628 |
off=4 method complete |
| 629 |
off=5 len=6 span[url]="/hello" |
| 630 |
off=12 url complete |
| 631 |
off=17 len=3 span[version]="1.1" |
| 632 |
off=20 version complete |
| 633 |
off=22 len=4 span[header_field]="Host" |
| 634 |
off=27 header_field complete |
| 635 |
off=28 len=9 span[header_value]="localhost" |
| 636 |
off=39 header_value complete |
| 637 |
off=39 len=3 span[header_field]="Foo" |
| 638 |
off=43 header_field complete |
| 639 |
off=44 len=3 span[header_value]="bar" |
| 640 |
off=49 error code=10 reason="Unexpected whitespace after header value" |
| 641 |
``` |
| 642 |
|
| 643 |
### Spaces before headers (lenient) |
| 644 |
|
| 645 |
<!-- meta={ "type": "request-lenient-headers" } --> |
| 646 |
|
| 647 |
```http |
| 648 |
POST /hello HTTP/1.1 |
| 649 |
Host: localhost |
| 650 |
Foo: bar |
| 651 |
Content-Length: 38 |
| 652 |
|
| 653 |
GET /bye HTTP/1.1 |
| 654 |
Host: localhost |
| 655 |
|
| 656 |
|
| 657 |
``` |
| 658 |
|
| 659 |
```log |
| 660 |
off=0 message begin |
| 661 |
off=0 len=4 span[method]="POST" |
| 662 |
off=4 method complete |
| 663 |
off=5 len=6 span[url]="/hello" |
| 664 |
off=12 url complete |
| 665 |
off=17 len=3 span[version]="1.1" |
| 666 |
off=20 version complete |
| 667 |
off=22 len=4 span[header_field]="Host" |
| 668 |
off=27 header_field complete |
| 669 |
off=28 len=9 span[header_value]="localhost" |
| 670 |
off=39 header_value complete |
| 671 |
off=39 len=3 span[header_field]="Foo" |
| 672 |
off=43 header_field complete |
| 673 |
off=44 len=3 span[header_value]="bar" |
| 674 |
off=49 len=19 span[header_value]=" Content-Length: 38" |
| 675 |
off=70 header_value complete |
| 676 |
off=72 headers complete method=3 v=1/1 flags=0 content_length=0 |
| 677 |
off=72 message complete |
| 678 |
off=72 reset |
| 679 |
off=72 message begin |
| 680 |
off=72 len=3 span[method]="GET" |
| 681 |
off=75 method complete |
| 682 |
off=76 len=4 span[url]="/bye" |
| 683 |
off=81 url complete |
| 684 |
off=86 len=3 span[version]="1.1" |
| 685 |
off=89 version complete |
| 686 |
off=91 len=4 span[header_field]="Host" |
| 687 |
off=96 header_field complete |
| 688 |
off=97 len=9 span[header_value]="localhost" |
| 689 |
off=108 header_value complete |
| 690 |
off=110 headers complete method=1 v=1/1 flags=0 content_length=0 |
| 691 |
off=110 message complete |
| 692 |
``` |