trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject git commit: Fix bug with GzipDefalate transformation
Date Tue, 04 Mar 2014 23:56:07 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master 912d5f2f8 -> d9ecf4f9e


Fix bug with GzipDefalate transformation


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

Branch: refs/heads/master
Commit: d9ecf4f9ec5bf8cc35b0329fc549c496466a0f7a
Parents: 912d5f2
Author: Brian Geffon <briang@apache.org>
Authored: Tue Mar 4 15:56:01 2014 -0800
Committer: Brian Geffon <briang@apache.org>
Committed: Tue Mar 4 15:56:01 2014 -0800

----------------------------------------------------------------------
 lib/atscppapi/src/GzipDeflateTransformation.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d9ecf4f9/lib/atscppapi/src/GzipDeflateTransformation.cc
----------------------------------------------------------------------
diff --git a/lib/atscppapi/src/GzipDeflateTransformation.cc b/lib/atscppapi/src/GzipDeflateTransformation.cc
index ac8348c..3b70c02 100644
--- a/lib/atscppapi/src/GzipDeflateTransformation.cc
+++ b/lib/atscppapi/src/GzipDeflateTransformation.cc
@@ -35,7 +35,7 @@ using std::vector;
 namespace {
 const int GZIP_MEM_LEVEL = 8;
 const int WINDOW_BITS = 31; // Always use 31 for gzip.
-const int ONE_KB = 1024;
+const unsigned int ONE_KB = 1024;
 }
 
 /**
@@ -94,7 +94,7 @@ void GzipDeflateTransformation::consume(const string &data) {
 
   // For small payloads the size can actually be greater than the original input
   // so we'll use twice the original size to avoid needless repeated calls to deflate.
-  unsigned long buffer_size = data.length() < static_cast<string::size_type>(ONE_KB
? 2 * ONE_KB : data.length());
+  unsigned long buffer_size = (data.length() < ONE_KB) ? 2 * ONE_KB : data.length();
   vector<unsigned char> buffer(buffer_size);
 
   do {


Mime
View raw message