Repository: trafficserver Updated Branches: refs/heads/master a090b1a08 -> 2a42c0ed8
TS-3998: Disable h2c upgrades This closes #338 Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/2a42c0ed Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/2a42c0ed Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/2a42c0ed Branch: refs/heads/master Commit: 2a42c0ed8d4b8967f42b215bbb39e7f2319b8745 Parents: a090b1a Author: Ryo Okubo <[email protected]> Authored: Mon Nov 30 10:17:50 2015 -0800 Committer: Bryan Call <[email protected]> Committed: Mon Nov 30 10:17:50 2015 -0800 ---------------------------------------------------------------------- proxy/http/HttpTransact.cc | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2a42c0ed/proxy/http/HttpTransact.cc ---------------------------------------------------------------------- diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc index 36b3767..343a0e6 100644 --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -983,28 +983,7 @@ HttpTransact::handle_upgrade_request(State *s) } } - /* - draft-ietf-httpbis-http2-15 - - 3.2. Starting HTTP/2 for "http" URIs - - The client makes an HTTP/1.1 request - that includes an Upgrade header field identifying HTTP/2 with the - "h2c" token. The HTTP/1.1 request MUST include exactly one - HTTP2-Settings header field. - */ - if (s->upgrade_token_wks == MIME_VALUE_H2C) { - MIMEField *http2_settings = s->hdr_info.client_request.field_find(MIME_FIELD_HTTP2_SETTINGS, MIME_LEN_HTTP2_SETTINGS); - - // TODO Check whether h2c is enabled or not. - if (http2_settings) { - s->state_machine->ua_session->set_h2c_upgrade_flag(); - build_upgrade_response(s); - TRANSACT_RETURN_VAL(SM_ACTION_INTERNAL_CACHE_NOOP, NULL, true); - } else { - DebugTxn("http_trans_upgrade", "Unable to upgrade connection to h2c, invalid headers"); - } - } + // TODO accept h2c token to start HTTP/2 session after TS-3498 is fixed } else { DebugTxn("http_trans_upgrade", "Transaction requested upgrade for unknown protocol: %s", upgrade_hdr_val); }
