The query with two separators
A backend discovers a parameter that its upstream cache never put in the request key.
What’s going wrong
A cache and a backend disagree about query boundaries. One treats only & as a delimiter; the other also splits at semicolons. This lets the same URL have two parameter interpretations.
Stdin is an array of query strings WITHOUT a leading question mark. Use ONLY literal & to separate fields. Skip empty fields; split each nonempty field at its first literal equals sign. A field with no equals sign has an empty value. Then percent-decode names and values as UTF-8, with + becoming a space. Inputs have valid UTF-8 and percent escapes. Preserve duplicate pairs, empty names/values and order. Literal or decoded semicolons are ordinary data. Decoded & or = characters never introduce new boundaries.
Print an array containing the ordered [name,value] pairs for each input query. No cache or network is run.
Expected behavior
Separate boundary recognition from decoding and preserve a single interpretation across layers.
Reproduction
["q=blue;admin=true"]
[[["q","blue;admin=true"]]]
["a=1&b=2"]
[[["a","1"],["b","2"]]]
[""]
[[]]
Before you begin
- Build on metadata parsing: distinguish structural delimiters from encoded values before normalization.
- Python strings, lists and dictionaries
- Read the report contract before changing code
Need a nudge?
Reveal one investigation hint at a time. Try each clue before opening the next.
Read the report, then sign in to start your investigation.