summaryrefslogtreecommitdiff
path: root/lib/https.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/https.js')
-rw-r--r--lib/https.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/https.js b/lib/https.js
index abe4a20907..edf0aa4432 100644
--- a/lib/https.js
+++ b/lib/https.js
@@ -14,6 +14,13 @@ function Server(opts, requestListener) {
opts.NPNProtocols = ['http/1.1', 'http/1.0'];
}
+ if (process.features.tls_alpn && !opts.ALPNProtocols) {
+ // http/1.0 is not defined as Protocol IDs in IANA
+ // http://www.iana.org/assignments/tls-extensiontype-values
+ // /tls-extensiontype-values.xhtml#alpn-protocol-ids
+ opts.ALPNProtocols = ['http/1.1'];
+ }
+
tls.Server.call(this, opts, http._connectionListener);
this.httpAllowHalfOpen = false;