1. 21 5月, 2012 3 次提交
    • A
      Return 400 Bad Request for URL paths with invalid encoding. · 3fc561a1
      Andrew White 提交于
      Passing path parameters with invalid encoding is likely to trigger errors
      further on like `ArgumentError (invalid byte sequence in UTF-8)`. This will
      result in a 500 error whereas the better error to return is a 400 error which
      allows exception notification libraries to filter it out if they wish.
      
      Closes #4450
      3fc561a1
    • A
      Raise ActionController::BadRequest for malformed parameter hashes. · 66eb3f02
      Andrew White 提交于
      Currently Rack raises a TypeError when it encounters a malformed or
      ambiguous hash like `foo[]=bar&foo[4]=bar`. Rather than pass this
      through to the application this commit captures the exception and
      re-raises it using a new ActionController::BadRequest exception.
      
      The new ActionController::BadRequest exception returns a 400 error
      instead of the 500 error that would've been returned by the original
      TypeError. This allows exception notification libraries to ignore
      these errors if so desired.
      
      Closes #3051
      66eb3f02
    • A
      Correct order of expected and actual arguments · 972376a9
      Andrew White 提交于
      972376a9
  2. 20 5月, 2012 12 次提交
  3. 19 5月, 2012 25 次提交