New issue
Advanced search Search tips
Starred by 2 users
Status: Fixed
Owner:
Closed: Jun 2
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment
Wrong status code used when rejecting push streams
Project Member Reported by jakearchibald@chromium.org, May 26 Back to list
Chrome rejects pushed streams if the item is already in the push cache. However, it rejects with the PROTOCOL_ERROR code, whereas it should use CANCEL or REFUSED_STREAM.

I used https://github.com/jakearchibald/http2-push-test to test, where the root URL pushes /data. If you refresh the page without requesting /data you'll see the PROTOCOL_ERROR.
 
Components: Internals>Network>HTTP2
Cc: zhongyi@chromium.org
jakearchibald@: Thanks for providing the feedback. Could you help provide a net-internals for us to investigate? And which version of chrome are you testing against?
Look for the H2 connection to localhost:3001.
chrome-net-export-log.json
264 KB View Download
Cc: -zhongyi@chromium.org b...@chromium.org ckrasic@chromium.org
Components: Internals>Network>QUIC
Owner: zhongyi@chromium.org
Status: Assigned
jakearchibald@: when you say "you'll see the PROTOCOL_ERROR", presumably you are saying the PROTOCOL_ERROR in net logs, right? It's not user visisble?

This is cancellation from push cache rather than the HTTP cache.

The error code is generated in SpdySession::TryCreatePushStream, where the resource has been pushed in an earlier promise, but not claimed. So next time, the resource is pushed again, the push cache will notice that. We currently generated a PROTOCL_ERROR, which is a minor bug as we are using the wrong error code. 

According to the sepc https://tools.ietf.org/html/rfc7540#section-8.2.2: iff the client determines, for any reason, that it does not wish to receive the pushed response from the server or if the server takes... the client can send a RST_STREAM frame, using either the CANCEL or REFUSED_STREAM code and referencing the pushed stream's identifier.

https://cs.chromium.org/chromium/src/net/spdy/chromium/spdy_session.cc?type=cs&q=Received+duplicate+pushed&l=1664

This bug applied to QUIC as well.
Project Member Comment 5 by bugdroid1@chromium.org, Jun 1
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4f304415e461ebcb905767d603cc580e691b81a9

commit 4f304415e461ebcb905767d603cc580e691b81a9
Author: zhongyi <zhongyi@chromium.org>
Date: Thu Jun 01 02:00:03 2017

Use correct error code: REFUSED_STREAM to reject server push from the server in SPDY.

BUG= 726725 

Review-Url: https://codereview.chromium.org/2914943002
Cr-Commit-Position: refs/heads/master@{#476147}

[modify] https://crrev.com/4f304415e461ebcb905767d603cc580e691b81a9/net/spdy/chromium/spdy_network_transaction_unittest.cc
[modify] https://crrev.com/4f304415e461ebcb905767d603cc580e691b81a9/net/spdy/chromium/spdy_session.cc

Components: -Internals>Network>QUIC
Labels: Needs-Feedback
Status: Fixed
Since there might be ongoing changes to supersede the RFC 7540 guidance, this bug currently only applies to HTTP/2 and is fixed in commit 4f304415e461ebcb905767d603cc580e691b81a9.

https://quicwg.github.io/base-drafts/draft-ietf-quic-http.html#rfc.section.6.1

jakearchibald@: the fix has been landed in Chrome Canary: 61.0.3118.0. Could you take a look and verify the fix? Thanks!
Sign in to add a comment