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
pull/1026/head
Tatsuhiro Tsujikawa 10 years ago
parent 01f8f11ab0
commit d11f610f37
  1. 4
      src/core/transport/chttp2_transport.c

@ -1655,7 +1655,9 @@ static int process_read(transport *t, gpr_slice slice) {
if (!init_frame_parser(t)) { if (!init_frame_parser(t)) {
return 0; 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 (t->incoming_frame_size == 0) {
if (!parse_frame_slice(t, gpr_empty_slice(), 1)) { if (!parse_frame_slice(t, gpr_empty_slice(), 1)) {
return 0; return 0;

Loading…
Cancel
Save