PSA: Opaque responses with a 206 status allowed in cache_storage

Skip to first unread message

Ben Kelly

Nov 24, 2021, 3:44:00 PM11/24/21
to blink-dev
Hi all,

This is a PSA that we have made a minor change to how opaque responses are stored in cache_storage.  This change shipped in M96.

The spec requires that we reject a cache.put() that would store a response with a status code of 206.  This status code refers to partial responses from a range request.

The spec, however, only does this for non-opaque responses.  We were previously incorrectly rejecting opaque 206 responses in this situation as well.

The main risk for this change is that sites may accidentally store partial responses when previously they could not.  This risk seems small, however, since sites already cannot tell if they are storing a 404 or 500 error for an opaque response either.  There is generally no way for a site to know if an opaque response is valid or not.  This is a big downside to opaque responses, but not a new one.

Please let me know if there are questions or concerns about this change.

Thank you.

Reply all
Reply to author
0 new messages