Skip to content

Tests: gzip 410 Gone responses. - #65

Open
ylw510 wants to merge 1 commit into
nginx:masterfrom
ylw510:gzip-compress-410
Open

Tests: gzip 410 Gone responses.#65
ylw510 wants to merge 1 commit into
nginx:masterfrom
ylw510:gzip-compress-410

Conversation

@ylw510

@ylw510 ylw510 commented Jun 15, 2026

Copy link
Copy Markdown

Tests: gzip 410 Gone responses

Proposed changes

Add test coverage for gzip compression of 410 Gone responses.

The gzip filter in nginx only compresses 200, 403, and 404 responses today. A companion change in nginx/nginx adds 410 to that set (see nginx/nginx#1452).

This PR extends gzip.t with:

  • a /gone location that returns 410 with a 64-byte text/plain body
  • three assertions:
    • 410 gone — response status is 410 Gone
    • gzip 410 — response includes Content-Encoding: gzip
    • gzip 410 content — gzipped body decodes to the expected payload

Related issue: nginx/nginx#1452

Companion nginx PR: (add link after opening, e.g. https://github.com/nginx/nginx/pull/XXXX)

Checklist

Before creating a PR, run through this checklist and mark each as complete:

How to run

TEST_NGINX_BINARY=/path/to/patched/nginx/objs/nginx prove gzip.t

The new 410-related subtests require an nginx binary that includes the gzip 410 change from the companion PR.

Verify that the gzip filter compresses 410 responses when enabled.
@ylw510

ylw510 commented Jun 15, 2026

Copy link
Copy Markdown
Author

Related PR: nginx/nginx#1466

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

Labels

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

2 participants