File tree Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Original file line number Diff line number Diff line change @@ -604,25 +604,12 @@ function onParserTimeout(server, socket) {
604
604
}
605
605
606
606
const noop = ( ) => { } ;
607
- const badRequestResponse = Buffer . from (
608
- `HTTP/1.1 400 ${ STATUS_CODES [ 400 ] } ${ CRLF } ` +
609
- `Connection: close${ CRLF } ${ CRLF } ` , 'ascii'
610
- ) ;
611
- const requestHeaderFieldsTooLargeResponse = Buffer . from (
612
- `HTTP/1.1 431 ${ STATUS_CODES [ 431 ] } ${ CRLF } ` +
613
- `Connection: close${ CRLF } ${ CRLF } ` , 'ascii'
614
- ) ;
615
607
function socketOnError ( e ) {
616
608
// Ignore further errors
617
609
this . removeListener ( 'error' , socketOnError ) ;
618
610
this . on ( 'error' , noop ) ;
619
611
620
612
if ( ! this . server . emit ( 'clientError' , e , this ) ) {
621
- if ( this . writable ) {
622
- const response = e . code === 'HPE_HEADER_OVERFLOW' ?
623
- requestHeaderFieldsTooLargeResponse : badRequestResponse ;
624
- this . write ( response ) ;
625
- }
626
613
this . destroy ( e ) ;
627
614
}
628
615
}
You can’t perform that action at this time.
0 commit comments