Skip to content
  • Alex Robbin's avatar
    ea40dd33
    quietly handle unknown HTTP methods in Action Dispatch SSL middleware · ea40dd33
    Alex Robbin authored
    Because `ActionDispatch::SSL` is included higher up in the middleware stack than `ActionDispatch::ShowExceptions`, it should ideally not be raising any exceptions.
    
    In this case, `ActionDispatch::Request#{get,head}?` are called, which check if the HTTP method is valid. If it isn't, `ActionController::UnknownHttpMethod` is raised. Instead of calling the Rack-provided predicate methods, we leverage `raw_request_method`.
    ea40dd33
    quietly handle unknown HTTP methods in Action Dispatch SSL middleware
    Alex Robbin authored
    Because `ActionDispatch::SSL` is included higher up in the middleware stack than `ActionDispatch::ShowExceptions`, it should ideally not be raising any exceptions.
    
    In this case, `ActionDispatch::Request#{get,head}?` are called, which check if the HTTP method is valid. If it isn't, `ActionController::UnknownHttpMethod` is raised. Instead of calling the Rack-provided predicate methods, we leverage `raw_request_method`.
Loading