Created
May 16, 2014 17:42
-
-
Save rnewson/d10ff2c042a337b8f1b4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/mochiweb_http.erl b/src/mochiweb_http.erl | |
index 38d51d4..335f813 100644 | |
--- a/src/mochiweb_http.erl | |
+++ b/src/mochiweb_http.erl | |
@@ -87,6 +87,7 @@ reentry(Body) -> | |
headers(Socket, Request, Headers, _Body, ?MAX_HEADERS) -> | |
%% Too many headers sent, bad request. | |
ok = mochiweb_socket:setopts(Socket, [{packet, raw}]), | |
+ couch_log:error("too many headers", []), | |
handle_invalid_request(Socket, Request, Headers); | |
headers(Socket, Request, Headers, Body, HeaderCount) -> | |
ok = mochiweb_socket:setopts(Socket, [{active, once}]), | |
@@ -126,14 +127,15 @@ handle_invalid_msg_request(Msg, Socket, Request, RevHeaders) -> | |
%% R15B02 returns this then closes the socket, so close and exit | |
mochiweb_socket:close(Socket), | |
exit(normal); | |
- _ -> | |
+ Else -> | |
+ couch_log:error("invalid ~p", [Else]), | |
handle_invalid_request(Socket, Request, RevHeaders) | |
end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment