You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2021/11/01 18:18:29 UTC

[trafficserver] branch 8.1.x updated: Revert "Add some checking to validate the scheme matches the wire protocol. (#8464)"

This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch 8.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/8.1.x by this push:
     new bbbf80d  Revert "Add some checking to validate the scheme matches the wire protocol. (#8464)"
bbbf80d is described below

commit bbbf80d75105313b51153c7fde0bf0edc8cf7783
Author: Bryan Call <bc...@apache.org>
AuthorDate: Mon Nov 1 10:50:09 2021 -0700

    Revert "Add some checking to validate the scheme matches the wire protocol. (#8464)"
    
    This reverts commit feefc5e4abc5011dfad5dcfef3f22998faf6e2d4.
---
 proxy/http/HttpSM.cc | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 791b625..f222714 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -732,17 +732,6 @@ HttpSM::state_read_client_request_header(int event, void *data)
   case PARSE_RESULT_DONE:
     SMDebug("http", "[%" PRId64 "] done parsing client request header", sm_id);
 
-    if (!is_internal) {
-      auto scheme = t_state.hdr_info.client_request.url_get()->scheme_get_wksidx();
-      if ((client_connection_is_ssl && (scheme == URL_WKSIDX_HTTP || scheme == URL_WKSIDX_WS)) ||
-          (!client_connection_is_ssl && (scheme == URL_WKSIDX_HTTPS || scheme == URL_WKSIDX_WSS))) {
-        SMDebug("http", "scheme [%s] vs. protocol [%s] mismatch", hdrtoken_index_to_wks(scheme),
-                client_connection_is_ssl ? "tls" : "plaintext");
-        t_state.http_return_code = HTTP_STATUS_BAD_REQUEST;
-        call_transact_and_set_next_state(HttpTransact::BadRequest);
-        break;
-      }
-    }
     ua_txn->set_session_active();
 
     if (t_state.hdr_info.client_request.version_get() == HTTPVersion(1, 1) &&