I’m using a 3rd party component that generates URLs with query strings.
These URLs are of the form:
http://host+port stuff/path/filename?¶m1=xyz¶m2=lskjf…
Notice the “&” on the first parameter in these URLs. In this form,
these URLs could not be served by WEBrick or Mongrel and I had to
modify this code to ensure that the first parameter did not have the
ampersand. A URL of the form:
http://host+port stuff/path/filename?param1=xyz¶m2=lskjf…
works just fine for both WEBrick and Mongrel.
I’ve checked both RFC 1738 and RFC 3986, which define URL formats, and
it appears to me that the first parameter in a query string may indeed
have “&” in front of the name. The 3rd party developer develops against
Apache and has never had this problem.
In addition, I can make this error occur in an Apache + FastCGI setup as
well. I see the following error in all 3 server configurations.
You have a nil object when you didn’t expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.include?
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/cgi_ext/cgi_methods.rb:49:in
`parse_request_parameters’
Is this possibly a bug in how Rails is parsing request URLs or am I
mistaken about the format of query strings per the RFCs?
Thanks,
Wes