Skip to content

keep '+' and '%2B' in the query distinct in cache keys - #963

Merged
ok2c merged 1 commit into
apache:masterfrom
Hsnmohd:cache-key-query-plus
Nov 24, 2026
Merged

ok2c merged 1 commit into
apache:masterfrom
Hsnmohd:cache-key-query-plus

Conversation

@Hsnmohd

@Hsnmohd Hsnmohd commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

CacheSupport.normalize re-encodes the query with plusAsBlank off, so ?q=a+b (a blank to form-decoding servers) and ?q=a%2Bb (a literal plus) end up with the same cache key and the caching client serves the cached response for one to requests for the other; decoding '+' as a blank before optimize() keeps them distinct.

@ok2c
ok2c merged commit 30080ca into apache:master Nov 24, 2026
12 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