-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Put a fallback URL at the beginning of signed exchanges #288
Conversation
This still needs a definition of request matching in a subsequent PR, and it probably has several mistakes, which I'm hoping my reviewers will catch.
As previously agreed with Chrome's loading team.
This makes it clearer that application/signed-exchange shouldn't parse and reserialize the headers. It suggests that plain responses and Pushed exchanges should serialize and reparse the headers, but they had to do the serialization step anyway, and reparsing ensures that untrusted headers aren't used.
The CBOR structure I was using before was an attempt to be forward-compatible, but now that the context string changes on each draft version, there's no need to include the item names in the message. Fixes WICG#276.
This lets the browser redirect there if it doesn't recognize the version of the signed exchange.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
99fa76f lgtm
|
||
1. The map mapping: | ||
* The byte string ':method' to the byte string containing `exchange`'s | ||
request's method. | ||
* The byte string ':url' to the byte string containing `exchange`'s request's |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering if we'd need to fix the blow example, that includes ':url' in cbor representation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I'll file a separate PR for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed #290
This lets the browser redirect there if it doesn't recognize the version of the signed exchange.
This sits on top of #287 and #281, so please only review
99fa76f
. It fixes #242.One question here is whether to include the method with the fallback URL. We can't do anything with a non-GET method right now, and after many years of HTTP, the only acceptable methods are GET and HEAD anyway, so I think we should consider dropping the method entirely, although not in this PR.
signed-responses: Preview, Diff
Loading: Preview