Closed atheiman closed 8 years ago
Actuallly, this is an issue with WEBrick. Shouldn't be a problem with passenger / apache I assume... The default acceptable chars for a URI are -_.!~*'()a-zA-Z\d
http://stackoverflow.com/a/5287528/3343740
A simpler fix for this might be swapping out WEBrick locally for passenger:
bundle exec passenger start
a good example of config.ru
with modular sinatra apps: https://groups.google.com/d/msg/sinatrarb/R2ay3usVrMU/a7eP1r1mIxwJ
another modular sinatra app with config.ru
example:
https://www.phusionpassenger.com/library/deploy/config_ru.html#sinatra
Only apply
URI.escape
to special characters indefault_
andoverride_
GET params.Only chars I've found that explicitly need URI encoding are curly braces:
?default_username=$option.username
works fine?default_username=${option.username}
returns a 400 Bad Request:Note that calling
URI.escape
multiple times has likely undesired effects because it escapes%
: