------------------------------------------------------------ revno: 13673 revision-id: squid3@treenet.co.nz-20141208081300-sa46fczlmgs9jxzl parent: squid3@treenet.co.nz-20141208081125-bb6amoj08trqgxul committer: Amos Jeffries branch nick: 3.5 timestamp: Mon 2014-12-08 00:13:00 -0800 message: HTTP/2: Support 421 (Misdirected Request) status code Add support for status 421 responses. Squid is forbidden from generating messages with this status in its role as proxy, however we expect to see it being produced in responses by HTTP/2 servers in traffic from HTTP 2.0<->1.1 gateways. We also MAY emit it on future reverse-proxy responses in the event of a ERR_CANNOT_FORWARD message. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20141208081300-sa46fczlmgs9jxzl # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.5 # testament_sha1: 50d88575bc3814d33bb97c1b3f23da6186070bc4 # timestamp: 2014-12-08 08:50:59 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.5 # base_revision_id: squid3@treenet.co.nz-20141208081125-\ # bb6amoj08trqgxul # # Begin patch === modified file 'src/http.cc' --- src/http.cc 2014-09-22 19:06:19 +0000 +++ src/http.cc 2014-12-08 08:13:00 +0000 @@ -516,6 +516,8 @@ case Http::scServiceUnavailable: case Http::scGatewayTimeout: + case Http::scMisdirectedRequest: + debugs(22, 3, "MAYBE because HTTP status " << rep->sline.status()); return -1; === modified file 'src/http/StatusCode.cc' --- src/http/StatusCode.cc 2014-09-13 13:59:43 +0000 +++ src/http/StatusCode.cc 2014-12-08 08:13:00 +0000 @@ -180,6 +180,10 @@ return "Expectation Failed"; break; + case Http::scMisdirectedRequest: + return "Misdirected Request"; + break; + case Http::scUnprocessableEntity: return "Unprocessable Entity"; break; === modified file 'src/http/StatusCode.h' --- src/http/StatusCode.h 2014-09-13 13:59:43 +0000 +++ src/http/StatusCode.h 2014-12-08 08:13:00 +0000 @@ -58,6 +58,7 @@ scUnsupportedMediaType = 415, scRequestedRangeNotSatisfied = 416, scExpectationFailed = 417, + scMisdirectedRequest = 421, /**< draft-ietf-httpbis-http2-16 section 9.1.2 */ scUnprocessableEntity = 422, /**< RFC2518 section 10.3 / RFC4918 */ scLocked = 423, /**< RFC2518 section 10.4 / RFC4918 */ scFailedDependency = 424, /**< RFC2518 section 10.5 / RFC4918 */