|Cancel push streams with the POST method|
|Project Member Reported by email@example.com, May 30||Back to list|
We don't currently match POST items in the push cache, so allowing them to be pushed is a waste of bandwidth. Firefox and Edge currently reject pushed POST requests. I built a little test suite thing for this: https://github.com/jakearchibald/http2-push-test/ The test is served at /push-post/.
POST push promises must be rejected according to RFC 7540 Section 8.2, so this is definitely a bug. http://httpwg.org/specs/rfc7540.html#PushResources "Promised requests MUST be cacheable (see [RFC7231], Section 4.2.3), MUST be safe (see [RFC7231], Section 4.2.1), and MUST NOT include a request body." Cacheable => GET, HEAD, or POST Safe => GET, HEAD, OPTIONS, or TRACE Therefore, a push promise must be a GET or HEAD.
Ohh, I missed that bit in the spec. Cheers!
Buck: Could you please verify that QUIC does the right thing? Thank you. See https://crrev.com/2943113002/#msg7. I thought I would have time this past week to write a QUIC unittest, but I didn't, sorry. I landed https://crrev.com/2943113002 (not sure why it wasn't auto-posted to this issue), which solves the issue for HTTP2 over TCP.
Bence: I verified, QUIC does the right thing. Code: https://codesearch.chromium.org/chromium/src/net/quic/core/quic_client_promised_info.cc?type=cs&q=QuicClientPromisedInfo::OnPromiseHeaders&l=38 Test: https://codesearch.chromium.org/chromium/src/net/quic/core/quic_client_promised_info_test.cc?q=PushPromiseInvalidMethod&l=143
Thank you for the quick response! I'm then marking this issue as Fixed.
|► Sign in to add a comment|