@@ -88,6 +88,8 @@ function ServerResponse(req) {
88
88
if ( req . method === 'HEAD' ) this . _hasBody = false ;
89
89
90
90
this . sendDate = true ;
91
+ this . _sent100 = false ;
92
+ this . _expect_continue = false ;
91
93
92
94
if ( req . httpVersionMajor < 1 || req . httpVersionMinor < 1 ) {
93
95
this . useChunkedEncodingByDefault = chunkExpression . test ( req . headers . te ) ;
@@ -195,8 +197,7 @@ function writeHead(statusCode, reason, obj) {
195
197
if ( common . _checkInvalidHeaderChar ( this . statusMessage ) )
196
198
throw new Error ( 'Invalid character in statusMessage.' ) ;
197
199
198
- var statusLine = 'HTTP/1.1 ' + statusCode . toString ( ) + ' ' +
199
- this . statusMessage + CRLF ;
200
+ var statusLine = 'HTTP/1.1 ' + statusCode + ' ' + this . statusMessage + CRLF ;
200
201
201
202
if ( statusCode === 204 || statusCode === 304 ||
202
203
( 100 <= statusCode && statusCode <= 199 ) ) {
@@ -232,7 +233,7 @@ function Server(requestListener) {
232
233
net . Server . call ( this , { allowHalfOpen : true } ) ;
233
234
234
235
if ( requestListener ) {
235
- this . addListener ( 'request' , requestListener ) ;
236
+ this . on ( 'request' , requestListener ) ;
236
237
}
237
238
238
239
/* eslint-disable max-len */
@@ -242,7 +243,7 @@ function Server(requestListener) {
242
243
/* eslint-enable max-len */
243
244
this . httpAllowHalfOpen = false ;
244
245
245
- this . addListener ( 'connection' , connectionListener ) ;
246
+ this . on ( 'connection' , connectionListener ) ;
246
247
247
248
this . timeout = 2 * 60 * 1000 ;
248
249
0 commit comments