-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: raw_query_string() #161
Comments
Sounds useful - think you could have a crack at a pull request? |
Yes tomorrow I will make a pull request. This email has been scanned by the Symantec Email Security.cloud service. |
What should happen with explicit creation of a CGI object?
Should raw_query_string return what was passed? Or always follow the env var? |
Good question. I think whatever the current object thinks is the current query string is the sensible thing to return. The code already has some checking at object instantiation so most of the logic is probably already there for returning the most recent (correct) query string. |
That said, look at url_param(). It always returns the parameters in QUERY_STRING, ignoring any parameter string passed at CGI object construction and ignoring any parameter changes set since. So I think this is precedent that raw_query_string() can also just use QUERY_STRING. |
Thanks for adding this. Sorry my patch got bogged down in the issue of |
While query_string() provides the current object state as an encoded string, sometimes you want access to the raw query string sent by the user. It would be useful to have a raw_query_string() function giving this. It would return $ENV{QUERY_STRING} but I think it is cleaner to have CGI.pm provide a function for this rather than user code poking around in the env vars directly.
The text was updated successfully, but these errors were encountered: