aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-03-12 22:57:22 +0900
committerGravatar Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-03-12 23:00:39 +0900
commitd11f610f3789317d3ca79e79f6a96457755bcdd9 (patch)
tree588fb47d18432e9397adb89c4d5c5af9744d2b5a /src
parent01f8f11ab092904e50f08780beda143252ee5e1c (diff)
Fix client sending invalid GOAWAY last-stream-id
Previously client sends its own initiated stream ID in last-stream-id field of GOAWAY, which misses the point in HTTP/2 specification. Unless server push is utilized heavily, client should not assign its transport's last_incoming_stream_id, since it is a response from server to client's initiated stream ID. This commit fixes it. See GH-1024
Diffstat (limited to 'src')
-rw-r--r--src/core/transport/chttp2_transport.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c
index 0d01a37112..5cc8375d65 100644
--- a/src/core/transport/chttp2_transport.c
+++ b/src/core/transport/chttp2_transport.c
@@ -1655,7 +1655,9 @@ static int process_read(transport *t, gpr_slice slice) {
if (!init_frame_parser(t)) {
return 0;
}
- t->last_incoming_stream_id = t->incoming_stream_id;
+ if (!t->is_client) {
+ t->last_incoming_stream_id = t->incoming_stream_id;
+ }
if (t->incoming_frame_size == 0) {
if (!parse_frame_slice(t, gpr_empty_slice(), 1)) {
return 0;