Skip to content

Commit 42d8ea0

Browse files
wesleytoddtniessen
authored andcommittedMar 25, 2018
http: support server options on createServer
PR-URL: nodejs#19461 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent c1ed782 commit 42d8ea0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎lib/http.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ const {
3333
ServerResponse
3434
} = require('_http_server');
3535

36-
function createServer(requestListener) {
37-
return new Server(requestListener);
36+
function createServer(opts, requestListener) {
37+
return new Server(opts, requestListener);
3838
}
3939

4040
function request(options, cb) {

‎test/parallel/test-http-server-options-incoming-message.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class MyIncomingMessage extends http.IncomingMessage {
1616
}
1717
}
1818

19-
const server = http.Server({
19+
const server = http.createServer({
2020
IncomingMessage: MyIncomingMessage
2121
}, common.mustCall(function(req, res) {
2222
assert.strictEqual(req.getUserAgent(), 'node-test');

0 commit comments

Comments
 (0)
Please sign in to comment.