Semicolons in request parameter in Rails 2.3


after upgrading Rails from 2.2.2 to 2.3.3 I realized that the handling
of request parameters has been changed regarding semicolons (that might
be due to the now integrated Rack interface). The following request

curl -d ‘hallo=1;2’

used to result in

Parameters: {“hallo”=>“1;2”}

in Rails 2.2.2. However, in Rails 2.3.3, the result is this:

Parameters: {“hallo”=>“1”, “2”=>nil}

My application receives ICS (i.e. iCal) plain text containing semicolons
wrapped inside a POST request, so in my case a semicolon is not meant
to separate different parameters. How can I restore the previous
behaviour in Rails 2.3?

Thank you

This may be more of a question for a Rack list, as that’s what’s doing
the parsing. However, I’d note that the only two incoming encodings
that the parameter parser supports are application/x-www-form-
urlencoded (which requires escaped semicolons) and multipart/form-
data. You might have more luck getting ahold of the unparsed POST body
from Rack::Request and handling it yourself.

–Matt J.

On Aug 13, 5:45 pm, “Florian j. Breunig” <rails-mailing-l…@andreas-

I see. The encoding of my incoming request is supposed to be
“multipart/form-data”, which does not require escaped semicolons. The
incorrect request encoding has never been much of an issue for me until
the recent Rails upgrade.

BTW this implies that the “-d” curl parameter mentioned above must be
replaced by “-F”.

Thank you for your help.