Skip to content

Ensure that deflate/brotli is filtered out in Accept Encoding by the Cypress proxy #28025

Closed

Description

@ryanthemanuel

Currently, Cypress tries to filter down Accept-Encoding headers to just gzip. This works when the header is present, but when it is blank according to the standards for the header:

If no Accept-Encoding header field is in the request, any content coding is considered acceptable by the user agent.

Thus, we need to update the logic to specify identity when there is no Accept Encoding header.

The problem would manifest itself in the following scenario:

  1. No Accept-Encoding header is sent on a request
  2. The server sends back the response encoded in an unsupported encoding (e.g. brotli/deflate)
  3. Something in Cypress relies on the decompressed body (this could include cy.intercept or CSS, font, and image assets in Test Replay)

Activity

  1. changed the title [-]Ensure that brotli is filtered out in Accept Encoding by the Cypress proxy[/-] [+]Ensure that deflate/brotli is filtered out in Accept Encoding by the Cypress proxy[/+] on Oct 10, 2023
  2. csvan commented on Oct 11, 2023

    @csvan

    Wouldn't a more scalable solution be to just support brotli? This encryption is extremely common on the modern web, and Cypress insisting on Gzip actually leads to compression issues when e.g. talking to CloudFront endpoints.

    #6197

  3. moved this from Understanding to Building in Cypress App Roadmapon Oct 11, 2023
  4. moved this from Building to Generally Available in Cypress App Roadmapon Oct 17, 2023
  5. cypress-bot commented on Oct 18, 2023

    @cypress-bot
    Contributor

    Released in 13.3.2.

    This comment thread has been locked. If you are still experiencing this issue after upgrading to
    Cypress v13.3.2, please open a new issue.

  6. locked as resolved and limited conversation to collaborators on Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions