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) {
604604}
605605
606606const 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- ) ;
615607function socketOnError ( e ) {
616608 // Ignore further errors
617609 this . removeListener ( 'error' , socketOnError ) ;
618610 this . on ( 'error' , noop ) ;
619611
620612 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- }
626613 this . destroy ( e ) ;
627614 }
628615}
You can’t perform that action at this time.
0 commit comments