File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -542,6 +542,7 @@ export class HTTP {
542
542
} ) . otherwise ( this . headersCompleted ( ) ) ,
543
543
} , onInvalidHeaderFieldChar ) ,
544
544
)
545
+ . peek ( ':' , p . error ( ERROR . INVALID_HEADER_TOKEN , 'Invalid header token' ) )
545
546
. otherwise ( span . headerField . start ( n ( 'header_field' ) ) ) ;
546
547
547
548
n ( 'header_field' )
Original file line number Diff line number Diff line change @@ -307,6 +307,27 @@ off=14 version complete
307
307
off=19 error code=10 reason="Invalid header token"
308
308
```
309
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
+
310
331
### Invalid method
311
332
312
333
<!-- meta={"type": "request"} -->
You can’t perform that action at this time.
0 commit comments