diff --git a/nativeLib/org.apache.thrift/lib/libthrift-0.9.0.so b/nativeLib/org.apache.thrift/lib/libthrift-0.9.0.so index 2ac48cd088..009254f991 100755 Binary files a/nativeLib/org.apache.thrift/lib/libthrift-0.9.0.so and b/nativeLib/org.apache.thrift/lib/libthrift-0.9.0.so differ diff --git a/nativeLib/org.apache.thrift/thrift-0.9.0-chunked-encoding.patch b/nativeLib/org.apache.thrift/thrift-0.9.0-chunked-encoding.patch new file mode 100755 index 0000000000..6ff9cf6b11 --- /dev/null +++ b/nativeLib/org.apache.thrift/thrift-0.9.0-chunked-encoding.patch @@ -0,0 +1,21 @@ +diff -ur thrift-0.9.0/lib/cpp/src/thrift/transport/THttpTransport.cpp thrift-0.9.0-chunked-encoding-fix/lib/cpp/src/thrift/transport/THttpTransport.cpp +--- thrift-0.9.0/lib/cpp/src/thrift/transport/THttpTransport.cpp 2012-10-12 00:58:06.000000000 +0000 ++++ thrift-0.9.0-chunked-encoding-fix/lib/cpp/src/thrift/transport/THttpTransport.cpp 2015-05-08 21:14:29.532529766 +0000 +@@ -90,8 +90,8 @@ + size = readChunked(); + } else { + size = readContent(contentLength_); ++ readHeaders_ = true; + } +- readHeaders_ = true; + return size; + } + +@@ -102,6 +102,7 @@ + uint32_t chunkSize = parseChunkSize(line); + if (chunkSize == 0) { + readChunkedFooters(); ++ readHeaders_ = true; + } else { + // Read data content + length += readContent(chunkSize); diff --git a/nativeLib/org.apache.thrift/thrift-0.9.0-http-refill.patch b/nativeLib/org.apache.thrift/thrift-0.9.0-http-refill.patch new file mode 100644 index 0000000000..7492a90005 --- /dev/null +++ b/nativeLib/org.apache.thrift/thrift-0.9.0-http-refill.patch @@ -0,0 +1,15 @@ +diff -ur thrift-0.9.0/lib/cpp/src/thrift/transport/THttpTransport.cpp thrift-0.9.0-http-refill/lib/cpp/src/thrift/transport/THttpTransport.cpp +--- thrift-0.9.0/lib/cpp/src/thrift/transport/THttpTransport.cpp 2012-10-12 00:58:06.000000000 +0000 ++++ thrift-0.9.0-http-refill/lib/cpp/src/thrift/transport/THttpTransport.cpp 2015-06-19 10:50:02.818636967 +0000 +@@ -80,7 +80,10 @@ + uint32_t size; + + // Get more data! +- refill(); ++ uint32_t avail = httpBufLen_ - httpPos_; ++ if (avail == 0) { ++ refill(); ++ } + + if (readHeaders_) { + readHeaders();