diff options
author | Micael Karlberg <[email protected]> | 2011-12-01 12:27:45 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2011-12-01 12:27:45 +0100 |
commit | 38bb19c5c4bdeeb4d54a62d687d9371eb7976c3f (patch) | |
tree | 230fc0054d2394885a2512017649b769b8ea26ad /lib/inets/src/http_server/httpd_request_handler.erl | |
parent | 3cf5f67f3545cc82147706cc83febc242f6e469a (diff) | |
parent | 5df28c6c7d3c5948ff02ae197f1f11eff96cc68d (diff) | |
download | otp-38bb19c5c4bdeeb4d54a62d687d9371eb7976c3f.tar.gz otp-38bb19c5c4bdeeb4d54a62d687d9371eb7976c3f.tar.bz2 otp-38bb19c5c4bdeeb4d54a62d687d9371eb7976c3f.zip |
Merge branch 'bmk/inets/inets58_integration2'
Diffstat (limited to 'lib/inets/src/http_server/httpd_request_handler.erl')
-rw-r--r-- | lib/inets/src/http_server/httpd_request_handler.erl | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/lib/inets/src/http_server/httpd_request_handler.erl b/lib/inets/src/http_server/httpd_request_handler.erl index d2f22fce93..b62c10bbc7 100644 --- a/lib/inets/src/http_server/httpd_request_handler.erl +++ b/lib/inets/src/http_server/httpd_request_handler.erl @@ -162,7 +162,14 @@ continue_init(Manager, ConfigDB, SocketType, Socket, TimeOut) -> %% {stop, Reason, State} %% Description: Handling call messages %%-------------------------------------------------------------------- -handle_call(Request, From, State) -> +handle_call(Request, From, #state{mod = ModData} = State) -> + Error = + lists:flatten( + io_lib:format("Unexpected request: " + "~n~p" + "~nto request handler (~p) from ~p" + "~n", [Request, self(), From])), + error_log(Error, ModData), {stop, {call_api_violation, Request, From}, State}. %%-------------------------------------------------------------------- @@ -171,8 +178,15 @@ handle_call(Request, From, State) -> %% {stop, Reason, State} %% Description: Handling cast messages %%-------------------------------------------------------------------- -handle_cast(Msg, State) -> - {reply, {cast_api_violation, Msg}, State}. +handle_cast(Msg, #state{mod = ModData} = State) -> + Error = + lists:flatten( + io_lib:format("Unexpected message: " + "~n~p" + "~nto request handler (~p)" + "~n", [Msg, self()])), + error_log(Error, ModData), + {noreply, State}. %%-------------------------------------------------------------------- %% handle_info(Info, State) -> {noreply, State} | @@ -253,7 +267,10 @@ handle_info(timeout, #state{mod = ModData} = State) -> %% Default case handle_info(Info, #state{mod = ModData} = State) -> Error = lists:flatten( - io_lib:format("Unexpected message received: ~n~p~n", [Info])), + io_lib:format("Unexpected info: " + "~n~p" + "~nto request handler (~p)" + "~n", [Info, self()])), error_log(Error, ModData), {noreply, State}. |