You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2017/03/09 18:03:09 UTC

[trafficserver] 02/03: Issue #1443 - Fix early or duplicate 404 error handling

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

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

commit 0765ca7ea2f26c722f80466617102063fa63259b
Author: Susan Hinrichs <sh...@ieee.org>
AuthorDate: Tue Feb 14 20:39:52 2017 +0000

    Issue #1443 - Fix early or duplicate 404 error handling
    
    (cherry picked from commit 6855338d2041e3a6e545e347c0b42ff8d32854c0)
---
 proxy/http/HttpSM.cc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 236dfd4..7302959 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -7246,7 +7246,14 @@ HttpSM::set_next_state()
       do_remap_request(true); /* run inline */
       DebugSM("url_rewrite", "completed inline remapping request for [%" PRId64 "]", sm_id);
       t_state.url_remap_success = remapProcessor.finish_remap(&t_state);
-      call_transact_and_set_next_state(nullptr);
+      if (t_state.next_action == HttpTransact::SM_ACTION_SEND_ERROR_CACHE_NOOP && t_state.transact_return_point == nullptr) {
+        // It appears that we can now set the next_action to error and transact_return_point to nullptr when
+        // going through do_remap_request presumably due to a plugin setting an error.  In that case, it seems
+        // that the error message has already been setup, so we can just return and avoid the further
+        // call_transact_and_set_next_state
+      } else {
+        call_transact_and_set_next_state(nullptr);
+      }
     } else {
       HTTP_SM_SET_DEFAULT_HANDLER(&HttpSM::state_remap_request);
       do_remap_request(false); /* dont run inline (iow on another thread) */

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.