Repository: trafficserver
Updated Branches:
  refs/heads/6.0.x 5453a8140 -> 26ec9c1c4


TS-3889 Avoid reenabling the txn before we release the mbuf

(cherry picked from commit 59da9685d5e494dae6a348540ca4e6541ac285c3)


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/26ec9c1c
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/26ec9c1c
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/26ec9c1c

Branch: refs/heads/6.0.x
Commit: 26ec9c1c49c0153c0e0af99297070e3950f46f50
Parents: 5453a81
Author: Leif Hedstrom <[email protected]>
Authored: Thu Sep 3 12:25:06 2015 -0600
Committer: Bryan Call <[email protected]>
Committed: Tue Sep 8 09:05:47 2015 -0700

----------------------------------------------------------------------
 plugins/experimental/authproxy/authproxy.cc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/26ec9c1c/plugins/experimental/authproxy/authproxy.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/authproxy/authproxy.cc 
b/plugins/experimental/authproxy/authproxy.cc
index e734b7a..0eb6f39 100644
--- a/plugins/experimental/authproxy/authproxy.cc
+++ b/plugins/experimental/authproxy/authproxy.cc
@@ -470,7 +470,8 @@ StateAuthProxySendResponse(AuthRequestContext *auth, void * 
/* edata ATS_UNUSED
 
   TSReleaseAssert(TSHttpHdrCopy(mbuf, mhdr, auth->rheader.buffer, 
auth->rheader.header) == TS_SUCCESS);
 
-  status = TSHttpHdrStatusGet(mbuf, mhdr), snprintf(msg, sizeof(msg), "%d 
%s\n", status, TSHttpHdrReasonLookup(status));
+  status = TSHttpHdrStatusGet(mbuf, mhdr);
+  snprintf(msg, sizeof(msg), "%d %s\n", status, TSHttpHdrReasonLookup(status));
 
   TSHttpTxnErrorBodySet(auth->txn, TSstrdup(msg), strlen(msg), 
TSstrdup("text/plain"));
 
@@ -483,8 +484,9 @@ StateAuthProxySendResponse(AuthRequestContext *auth, void * 
/* edata ATS_UNUSED
 
   AuthLogDebug("sending auth proxy response for status %d", status);
 
-  TSHttpTxnReenable(auth->txn, TS_EVENT_HTTP_CONTINUE);
   TSHandleMLocRelease(mbuf, TS_NULL_MLOC, mhdr);
+  TSHttpTxnReenable(auth->txn, TS_EVENT_HTTP_CONTINUE);
+
   return TS_EVENT_CONTINUE;
 }
 

Reply via email to