Do you consider this a bug?
GET/hello?world results in :query-string "world", as expected
GET/hello results in :query-string nil, as expected (no query string at all)
Now this one
GET/hello? results in :query-string nil - I expected to find :query-string "" (query string exists, and is empty)
What do you think?
Claude found me a citation to RFC 3986 section 6.2.3 (https://datatracker.ietf.org/doc/html/rfc3986#section-6.2.3). It gives examples and says they are distinct.
?
"Normalization should not remove delimiters when their associated component is empty unless licensed to do so by the scheme specification. For example, the URI "http://example.com/?" cannot be assumed to be equivalent to any of the examples above." (That might be a big "unless"... Claude also told me, "RFC 9110 does not license removing the empty query delimiter.") Claude also found BNF that specifies the query can be present-and-zero-characters-long.I'm concerned that fixing this, changing the current behavior to be correct, could cause unwanted breaking changes that would be hard to chase down.
@hlship Another 3 perspectives are -- 1) The new ("current") behavior introduced a breaking change, which is how it got noticed. A correction could be regarded as just-an-aftershock on the way to 1.0. 2) The canonical RFCs could be regarded as a giant, long-term, labor-saving device, for both Pedestal maintainers and users. Deviations tend to impose an ongoing "tax" on supporters and users. The Clojure ecosystem has realized tremendous leverage from widespread adherence to RFCs, the Ring Spec (...), the data structures of clojure.xml and Hiccup, and Datomic-flavored Datalog. Interoperability is leverage. Short-term inconvenience to forever cure a spec-related issue would be a good investment. 3) Website implementers may need to honor the URL choices made by others. Routers that do not respect the full range of the spec introduce risk. Pedestal routing choices would be strictly "simpler" if the routers differed in efficiency tradeoffs only.