Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: CGI.pm: Want your query_string() sorted or unsorted?

by dsheroh (Monsignor)
on Aug 13, 2009 at 11:01 UTC ( [id://788217]=note: print w/replies, xml ) Need Help??


in reply to CGI.pm: Want your query_string() sorted or unsorted?

Reordering the query string doesn't sound like a particularly safe operation to me. It seems like something where order-dependency may be somewhat common. Given ikegami's point about the HTML4 spec specifying how it's to be ordered (which I assume is accurate, but I haven't checked to verify), it would appear that reordering it would be non-standards-compliant and, therefore, definitively wrong.

What about adding either a sorted_query_string (as already suggested) or a query_hash method? Personally, query_hash seems like the more general and more likely to be useful of the two, but either would handle the comparability case that you've made.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://788217]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-25 05:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found