Merge tag 'OB_14.4.1-53' into ncep_14.4.1-n

14.4.1-53


Former-commit-id: 5901c5d228 [formerly 2b743fe8abc1b3391c4d05a79e36846e0f258698]
Former-commit-id: e3e7ad8d3d
This commit is contained in:
Steven Harris 2015-07-21 15:07:26 -05:00
commit 1a78c3fb07
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();