diff options
author | Ivan Blinkov <[email protected]> | 2012-10-27 02:36:33 +0400 |
---|---|---|
committer | Ivan Blinkov <[email protected]> | 2012-10-27 02:36:33 +0400 |
commit | 0ce16b3cea25187914df89224c4e204b7715420e (patch) | |
tree | 171c4d5ab9b2d99eaf1053267359272f5dac3e4f /src/cowboy_protocol.erl | |
parent | d3277b08ce81d6180ad68dc91d5edda00c426544 (diff) | |
download | cowboy-0ce16b3cea25187914df89224c4e204b7715420e.tar.gz cowboy-0ce16b3cea25187914df89224c4e204b7715420e.tar.bz2 cowboy-0ce16b3cea25187914df89224c4e204b7715420e.zip |
Return "400 Bad Request" instead of crashing process on incorrect queries like /%qq
Diffstat (limited to 'src/cowboy_protocol.erl')
-rw-r--r-- | src/cowboy_protocol.erl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cowboy_protocol.erl b/src/cowboy_protocol.erl index c5ea561..df2e963 100644 --- a/src/cowboy_protocol.erl +++ b/src/cowboy_protocol.erl @@ -464,6 +464,8 @@ dispatch(Req, State=#state{dispatch=Dispatch}, Host, Path) -> handler_init(Req2, State, Handler, Opts); {error, notfound, host} -> error_terminate(400, State); + {error, badrequest, path} -> + error_terminate(400, State); {error, notfound, path} -> error_terminate(404, State) end. |