@@ -88,6 +88,8 @@ function ServerResponse(req) {
8888 if ( req . method === 'HEAD' ) this . _hasBody = false ;
8989
9090 this . sendDate = true ;
91+ this . _sent100 = false ;
92+ this . _expect_continue = false ;
9193
9294 if ( req . httpVersionMajor < 1 || req . httpVersionMinor < 1 ) {
9395 this . useChunkedEncodingByDefault = chunkExpression . test ( req . headers . te ) ;
@@ -195,8 +197,7 @@ function writeHead(statusCode, reason, obj) {
195197 if ( common . _checkInvalidHeaderChar ( this . statusMessage ) )
196198 throw new Error ( 'Invalid character in statusMessage.' ) ;
197199
198- var statusLine = 'HTTP/1.1 ' + statusCode . toString ( ) + ' ' +
199- this . statusMessage + CRLF ;
200+ var statusLine = 'HTTP/1.1 ' + statusCode + ' ' + this . statusMessage + CRLF ;
200201
201202 if ( statusCode === 204 || statusCode === 304 ||
202203 ( 100 <= statusCode && statusCode <= 199 ) ) {
@@ -232,7 +233,7 @@ function Server(requestListener) {
232233 net . Server . call ( this , { allowHalfOpen : true } ) ;
233234
234235 if ( requestListener ) {
235- this . addListener ( 'request' , requestListener ) ;
236+ this . on ( 'request' , requestListener ) ;
236237 }
237238
238239 /* eslint-disable max-len */
@@ -242,7 +243,7 @@ function Server(requestListener) {
242243 /* eslint-enable max-len */
243244 this . httpAllowHalfOpen = false ;
244245
245- this . addListener ( 'connection' , connectionListener ) ;
246+ this . on ( 'connection' , connectionListener ) ;
246247
247248 this . timeout = 2 * 60 * 1000 ;
248249
0 commit comments