You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by so...@apache.org on 2015/09/17 17:53:38 UTC

trafficserver git commit: TS-3912: Fix Coverity CID 1324531

Repository: trafficserver
Updated Branches:
  refs/heads/master d7170e2d7 -> c3e2b466b


TS-3912: Fix Coverity CID 1324531


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

Branch: refs/heads/master
Commit: c3e2b466b90e2568cf3a338a278cedfe731d766e
Parents: d7170e2
Author: Phil Sorber <so...@apache.org>
Authored: Thu Sep 17 09:53:16 2015 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Thu Sep 17 09:53:16 2015 -0600

----------------------------------------------------------------------
 proxy/http/HttpTransactCache.cc | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c3e2b466/proxy/http/HttpTransactCache.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpTransactCache.cc b/proxy/http/HttpTransactCache.cc
index 57c8559..d8bde18 100644
--- a/proxy/http/HttpTransactCache.cc
+++ b/proxy/http/HttpTransactCache.cc
@@ -1337,6 +1337,8 @@ HttpTransactCache::match_response_to_request_conditionals(HTTPHdr *request, HTTP
     if (raw_etags) {
       comma_sep_tag_list = request->value_get(MIME_FIELD_IF_NONE_MATCH, MIME_LEN_IF_NONE_MATCH, &comma_sep_tag_list_len);
     } else {
+      raw_etags = "";
+      raw_etags_len = 0;
       // no Etag in the response, so there is nothing to match
       // against those in If-none-match
       goto L1;
@@ -1347,10 +1349,6 @@ HttpTransactCache::match_response_to_request_conditionals(HTTPHdr *request, HTTP
       comma_sep_tag_list_len = 0;
     }
 
-    if (!raw_etags) {
-      raw_etags = "";
-      raw_etags_len = 0;
-    }
     ////////////////////////////////////////////////////////////////////////
     // If we have an etag and a if-none-match, we are talking to someone  //
     // who is doing a 1.1 revalidate. Since this is a GET request with no //