cgi
cgi copied to clipboard
Unable to read query params in a POST method
The current logic around handling query params is flawed.
Parameters are only drawn from the query string on GET or HEAD requests.
https://github.com/ruby/cgi/blob/master/lib/cgi/core.rb#L661-L699
The correct solution would to not draw the parameters either from the POST_DATA, stdin or the QUERY_STRING depending on context.
I think there should be independent variables for POST/form data and the query paramaters. Something like @form and @params.
For now I am working with this patch: https://github.com/LevitatingBusinessMan/cgi/commit/e0501efab6f023a987081be60884090547554a17