From 6860d73212d2a36fd789a9244667be574f396164 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Mon, 10 Jun 2019 21:04:45 -0700 Subject: [PATCH] fix(network): align HTTP status codes with IANA (#4567) Aline HTTP status texts with https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml --- lib/NetworkManager.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/NetworkManager.js b/lib/NetworkManager.js index a489794e..37a59d05 100644 --- a/lib/NetworkManager.js +++ b/lib/NetworkManager.js @@ -728,19 +728,22 @@ function headersArray(headers) { return result; } +// List taken from https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml with extra 306 and 418 codes. const STATUS_TEXTS = { '100': 'Continue', '101': 'Switching Protocols', '102': 'Processing', + '103': 'Early Hints', '200': 'OK', '201': 'Created', '202': 'Accepted', '203': 'Non-Authoritative Information', '204': 'No Content', + '205': 'Reset Content', '206': 'Partial Content', '207': 'Multi-Status', '208': 'Already Reported', - '209': 'IM Used', + '226': 'IM Used', '300': 'Multiple Choices', '301': 'Moved Permanently', '302': 'Found', @@ -773,6 +776,7 @@ const STATUS_TEXTS = { '422': 'Unprocessable Entity', '423': 'Locked', '424': 'Failed Dependency', + '425': 'Too Early', '426': 'Upgrade Required', '428': 'Precondition Required', '429': 'Too Many Requests',