trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject svn commit: r1158321 - /trafficserver/traffic/trunk/proxy/InkAPI.cc
Date Tue, 16 Aug 2011 15:13:47 GMT
Author: zwoop
Date: Tue Aug 16 15:13:46 2011
New Revision: 1158321

URL: http://svn.apache.org/viewvc?rev=1158321&view=rev
Log:
TS-916 TSHttpIsInternalRequest() crashes if client connection is terminated prematurely

Author: Manjesh Nilange
Review: leif

Modified:
    trafficserver/traffic/trunk/proxy/InkAPI.cc

Modified: trafficserver/traffic/trunk/proxy/InkAPI.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/InkAPI.cc?rev=1158321&r1=1158320&r2=1158321&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/InkAPI.cc (original)
+++ trafficserver/traffic/trunk/proxy/InkAPI.cc Tue Aug 16 15:13:46 2011
@@ -7110,9 +7110,11 @@ TSHttpIsInternalRequest(TSHttpTxn txnp)
 
   TSHttpSsn ssnp = TSHttpTxnSsnGet(txnp);
   HttpClientSession *cs = (HttpClientSession *) ssnp;
-  NetVConnection *vc = cs->get_netvc();
+  if (!cs)
+    return TS_ERROR;
 
-  if (!cs || !vc)
+  NetVConnection *vc = cs->get_netvc();
+  if (!vc)
     return TS_ERROR;
 
   return vc->get_is_internal_request() ? TS_SUCCESS : TS_ERROR;



Mime
View raw message