You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2017/04/19 23:32:49 UTC
[trafficserver] branch 7.1.x updated: Fixes padding byte being part
of the POST/PUT data (2nd try)
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/7.1.x by this push:
new 48a0242 Fixes padding byte being part of the POST/PUT data (2nd try)
48a0242 is described below
commit 48a0242ca170d09ccabd4e184ce52501284294ef
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Wed Apr 19 10:14:48 2017 +0900
Fixes padding byte being part of the POST/PUT data (2nd try)
(cherry picked from commit 74bbc781382146c9d87683b8c0ebc537ee40cdee)
---
proxy/http2/Http2ConnectionState.cc | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc
index 5954021..8b24b29 100644
--- a/proxy/http2/Http2ConnectionState.cc
+++ b/proxy/http2/Http2ConnectionState.cc
@@ -102,7 +102,7 @@ rcv_data_frame(Http2ConnectionState &cstate, const Http2Frame &frame)
}
if (frame.header().flags & HTTP2_FLAGS_DATA_PADDED) {
- frame.reader()->read(&pad_length, HTTP2_DATA_PADLEN_LEN);
+ frame.reader()->memcpy(&pad_length, HTTP2_DATA_PADLEN_LEN, nbytes);
nbytes += HTTP2_DATA_PADLEN_LEN;
if (pad_length > payload_length) {
// If the length of the padding is the length of the
@@ -150,6 +150,10 @@ rcv_data_frame(Http2ConnectionState &cstate, const Http2Frame &frame)
// update its offset via consume. Otherwise, we will read the same data on the
// second time through
IOBufferReader *myreader = frame.reader()->clone();
+ // Skip pad length field
+ if (frame.header().flags & HTTP2_FLAGS_DATA_PADDED) {
+ myreader->consume(HTTP2_DATA_PADLEN_LEN);
+ }
while (nbytes < payload_length - pad_length) {
size_t read_len = BUFFER_SIZE_FOR_INDEX(buffer_size_index[HTTP2_FRAME_TYPE_DATA]);
if (nbytes + read_len > unpadded_length) {
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].