Updated Branches: refs/heads/master f41323e01 -> ec019615f
TS-1708: Using tr-pass port option causes requests with large headers to hang If 4KB of headers are read and we haven't decided on requets validity yet, disregard tr-pass option in order to avoid blocking the writer Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/ec019615 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/ec019615 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/ec019615 Branch: refs/heads/master Commit: ec019615ff15894e01b91ea7b593a76534883b3b Parents: f41323e Author: Uri Shachar <ushac...@apache.org> Authored: Fri Mar 22 17:10:02 2013 +0200 Committer: Uri Shachar <ushac...@apache.org> Committed: Fri Mar 22 17:10:02 2013 +0200 ---------------------------------------------------------------------- CHANGES | 2 ++ proxy/http/HttpSM.cc | 12 ++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ec019615/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index 4669806..61e5938 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,8 @@ Changes with Apache Traffic Server 3.3.2 + *) [TS-1708] Using tr-pass port option causes requests with large headers to hang + *) [TS-1734] Remove dead code that invokes missing vmap_config tool Author: John Kew <john.v.kew...@gmail.com> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ec019615/proxy/http/HttpSM.cc ---------------------------------------------------------------------- diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index bbd6495..17f3ba7 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -728,9 +728,9 @@ HttpSM::state_read_client_request_header(int event, void *data) if (event == VC_EVENT_READ_READY && state == PARSE_ERROR && - is_transparent_passthrough_allowed()) { + is_transparent_passthrough_allowed() && + ua_raw_buffer_reader != NULL) { - ink_assert(ua_raw_buffer_reader != NULL); DebugSM("http", "[%" PRId64 "] first request on connection failed parsing, switching to passthrough.", sm_id); t_state.transparent_passthrough = true; @@ -773,6 +773,14 @@ HttpSM::state_read_client_request_header(int event, void *data) call_transact_and_set_next_state(HttpTransact::BadRequest); break; } else { + if (is_transparent_passthrough_allowed() && + ua_raw_buffer_reader != NULL && + ua_raw_buffer_reader->get_current_block()->write_avail() <= 0) { + //Disable passthrough regardless of eventual parsing failure or success -- otherwise + //we either have to consume some data or risk blocking the writer. + ua_raw_buffer_reader->dealloc(); + ua_raw_buffer_reader = NULL; + } ua_entry->read_vio->reenable(); return VC_EVENT_CONT; }