Skip to content
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

Pass in Content-Encoding to resource-timing #1742

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Jxck
Copy link

@Jxck Jxck commented Mar 25, 2024

These changes are to support addition of content type attribute to Perfomance resource timing. Further details are available at
w3c/resource-timing#381

(See WHATWG Working Mode: Changes for more details.)


Preview | Diff

Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to actually define how the value is obtained. "extracting header list values" shouldn't be used for new features.

And similarly to Content-Type we probably want to minimize the information that is exchanged through some sort of safelisting.

@Jxck
Copy link
Author

Jxck commented Mar 25, 2024

@annevk Thanks for reviewing. I'm new to this area so I wanna ask you something.

we need to actually define how the value is obtained.

Do you means that this change require "extract Content Encoding" algorithm like "extract a MIME type" ?
https://fetch.spec.whatwg.org/#concept-header-extract-mime-type

we probably want to minimize the information

I think it should be seems like restricted to well-known codings like

  • identity ?
  • deflate
  • gzip
  • br
  • zstd

is that right ? or is there some lists which I should refer to ?

@annevk
Copy link
Member

annevk commented Mar 25, 2024

Yeah, extract a MIME type is an example of modern-style header parsing. I think all things written in terms of https://fetch.spec.whatwg.org/#concept-header-list-get or https://fetch.spec.whatwg.org/#concept-header-list-get-decode-split are good examples.

There is a registry for content codings here: https://www.iana.org/assignments/http-parameters/http-parameters.xhtml#content-coding. I'm not sure if we have to acknowledge all of them however. exi and pack200-gzip don't need to be supported for instance and x-gzip can be normalized to gzip.

@annevk
Copy link
Member

annevk commented Mar 25, 2024

See also #716.

@yoavweiss
Copy link
Collaborator

We should also include br-d and zstd-d

@Jxck
Copy link
Author

Jxck commented Mar 25, 2024

@annevk Thanks, I'll be digging them.

@yoavweiss in this case, should new encodings be added to the IANA list first ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants