rails/rails — pull request #16887 by yuki24 (2014-09-12 02:46:51+00:00)
Title: Fix a bug where malformed query strings lead to 500

This is a backport of #16886.