https: make opts optional & immutable when create

`opts` in `createServer` will be immutable that won't change origional
opts value. What's more, it's optional which can make `requestListener`
be the first argument.

PR-URL: https://github.com/nodejs/node/pull/13599
Fixes: https://github.com/nodejs/node/issues/13584
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
This commit is contained in:
XadillaX authored and Anna Henningsen committed 2017-07-11 19:16:38 +02:00
1 parent 3bb4ec80ae
commit 74741fa52b
3 files changed
+51 -1

No files matched your search

+1 -1
View File
@@ -46,7 +46,7 @@ added: v8.0.0
See [`http.Server#keepAliveTimeout`][].
## https.createServer(options[, requestListener])
## https.createServer([options][, requestListener])
<!-- YAML
added: v0.3.4
-->