ASM #17630 - Update with patched thrift libraries

Change-Id: Ibde2e2fb283f9b21360de4a013706409a7f941f1

Former-commit-id: ce6c9e536cd45d030b74d9cedf66b4a8cdb18bb3
This commit is contained in:
Shawn.Hooper 2015-06-19 11:24:23 -04:00
parent cfc845d2b5
commit 25f8ca9be0
3 changed files with 36 additions and 0 deletions

View file

@ -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);

View file

@ -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();