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

✨ Checks mime for incorrect content type fonts #1339

Merged
merged 1 commit into from
Aug 4, 2023

Conversation

ninadbstack
Copy link
Contributor

Context:

  • We know that browser does not return correct body for font responses to us and so we need to fetch it directly
  • Now if server is not returning correct mimetype for font files [ if its sending application/octate-stream for example ] we didnt fetch font again as mime didnt match
  • This caused errors while rendering font later in percy

Change:

  • We now infer mime for all requests from url [ irrespective of original content type ] and if its font then we fetch it directly
  • We dont tamper with original content type to honor browser behaviour when this gets rendered

@ninadbstack ninadbstack requested a review from a team as a code owner August 4, 2023 06:29
Copy link
Contributor

@itsjwala itsjwala left a comment

Choose a reason for hiding this comment

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

Nice 🔥

@ninadbstack ninadbstack merged commit 6c3a6b1 into master Aug 4, 2023
34 checks passed
@ninadbstack ninadbstack deleted the fix-font-fetch-for-incorrect-mimetype branch August 4, 2023 12:09
@ninadbstack ninadbstack added the ✨ enhancement New feature or request label Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants