fix(gzhttp): preserve qvalue when extra parameters follow in Accept-Encoding#1116
fix(gzhttp): preserve qvalue when extra parameters follow in Accept-Encoding#1116klauspost merged 1 commit intoklauspost:masterfrom
Conversation
…ncoding parseCoding() reset qvalue to DefaultQValue on every loop iteration, causing "gzip;q=0.5;level=6" to incorrectly return qvalue=1.0 instead of 0.5. Move qvalue initialization before the loop. Signed-off-by: Mathias Bogaert <mathias.bogaert@gmail.com>
📝 WalkthroughWalkthroughThe qvalue initialization in the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🔇 Additional comments (2)
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. Comment |
parseCoding() reset qvalue to DefaultQValue on every loop iteration, causing "gzip;q=0.5;level=6" to incorrectly return qvalue=1.0 instead of 0.5.
Move qvalue initialization before the loop.
Summary by CodeRabbit
Bug Fixes
Tests
✏️ Tip: You can customize this high-level summary in your review settings.