Skip to content

gzhttp: Canonicalize ETag header#1139

Merged
klauspost merged 1 commit intoklauspost:masterfrom
justinmayhew:push-vsllupnmyopz
Mar 29, 2026
Merged

gzhttp: Canonicalize ETag header#1139
klauspost merged 1 commit intoklauspost:masterfrom
justinmayhew:push-vsllupnmyopz

Conversation

@justinmayhew
Copy link
Copy Markdown
Contributor

@justinmayhew justinmayhew commented Mar 28, 2026

This ensures the fast-path is hit in the net/http header functions for a minor speed improvement.

This ensures the fast-path is hit in the net/http header functions for a
minor speed improvement.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b819dd18-81ca-4496-9e4e-fec2cc57d9f0

📥 Commits

Reviewing files that changed from the base of the PR and between c5e0077 and 3b2e70e.

📒 Files selected for processing (2)
  • gzhttp/compress.go
  • gzhttp/compress_test.go

📝 Walkthrough

Walkthrough

The ETag header name is being changed from "ETag" to "Etag" across the gzip compression module and its corresponding tests. Both production code and test cases are updated consistently with this change.

Changes

Cohort / File(s) Summary
ETag Header Renaming
gzhttp/compress.go, gzhttp/compress_test.go
Updated the ETag header string constant from "ETag" to "Etag" in both the compression handler implementation and all associated test setup/assertions.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'gzhttp: Canonicalize ETag header' accurately summarizes the main change: converting the ETag header string from non-canonical 'ETag' to canonical 'Etag' format for performance optimization.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@klauspost klauspost merged commit 15967de into klauspost:master Mar 29, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants