From 1b090c9b66e7a7d570e5f551bc8faa4087e36d6e Mon Sep 17 00:00:00 2001 From: Yosuke Furukawa Date: Wed, 1 Nov 2017 01:19:36 +0900 Subject: [PATCH] http, http2: add 103 Early Hints status code PR-URL: https://github.com/nodejs/node/pull/16644 Reviewed-By: James M Snell Reviewed-By: Anatoli Papirovski Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen --- lib/_http_server.js | 1 + src/node_http2.h | 1 + test/parallel/test-http2-binding.js | 1 + 3 files changed, 3 insertions(+) diff --git a/lib/_http_server.js b/lib/_http_server.js index bfbab222264652..04161ac024b3dc 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -44,6 +44,7 @@ const STATUS_CODES = { 100: 'Continue', 101: 'Switching Protocols', 102: 'Processing', // RFC 2518, obsoleted by RFC 4918 + 103: 'Early Hints', 200: 'OK', 201: 'Created', 202: 'Accepted', diff --git a/src/node_http2.h b/src/node_http2.h index 39ed27249d3617..a19e032ccef1e6 100644 --- a/src/node_http2.h +++ b/src/node_http2.h @@ -158,6 +158,7 @@ HTTP_KNOWN_HEADER_MAX V(CONTINUE, 100) \ V(SWITCHING_PROTOCOLS, 101) \ V(PROCESSING, 102) \ + V(EARLY_HINTS, 103) \ V(OK, 200) \ V(CREATED, 201) \ V(ACCEPTED, 202) \ diff --git a/test/parallel/test-http2-binding.js b/test/parallel/test-http2-binding.js index 5b7a74a0324ef8..8935e569f500c6 100644 --- a/test/parallel/test-http2-binding.js +++ b/test/parallel/test-http2-binding.js @@ -31,6 +31,7 @@ const expectedStatusCodes = { HTTP_STATUS_CONTINUE: 100, HTTP_STATUS_SWITCHING_PROTOCOLS: 101, HTTP_STATUS_PROCESSING: 102, + HTTP_STATUS_EARLY_HINTS: 103, HTTP_STATUS_OK: 200, HTTP_STATUS_CREATED: 201, HTTP_STATUS_ACCEPTED: 202,