Skip to content

Server error pages return encoded data without content-encoding header if accept-encoding is gzip #2468

Open
@serhalp

Description

@serhalp

If a Next.js page returns a 500 error and the browser sent accept-encoding gzip, it seems the returned data is encoded, but no encoding header is set, so the browser cannot decode it.

curl --request GET --url https://66056f2be8186e00aaea53d3--next-e2e-tests.netlify.app/enoent --header 'Accept-Encoding: gzip'

Data

The following is parsed automatically by the Next.js repo e2e test report generator.

test case: https://github.com/vercel/next.js/blob/canary/test/e2e/getserversideprops/test/index.test.ts#L367
test: test/e2e/getserversideprops/test/index.test.ts
reason: Server error pages return encoded data without content-encoding header if accept-encoding is gzip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions