aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_server
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2014-03-31 11:28:41 +0200
committerIngela Anderton Andin <[email protected]>2014-03-31 11:28:41 +0200
commit704481c61c1e0e17d0ffed8cbff4bf746a2147eb (patch)
tree22d7160d77a9543f38813a7931de68f9caade68a /lib/inets/src/http_server
parent91cc9ce5112591c274a1b0850b0a9f3ec0a49676 (diff)
downloadotp-704481c61c1e0e17d0ffed8cbff4bf746a2147eb.tar.gz
otp-704481c61c1e0e17d0ffed8cbff4bf746a2147eb.tar.bz2
otp-704481c61c1e0e17d0ffed8cbff4bf746a2147eb.zip
inets: Handle all response codes in httpd_util:message/3
Diffstat (limited to 'lib/inets/src/http_server')
-rw-r--r--lib/inets/src/http_server/httpd_util.erl9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/inets/src/http_server/httpd_util.erl b/lib/inets/src/http_server/httpd_util.erl
index b0b18b9c3d..0d04a75205 100644
--- a/lib/inets/src/http_server/httpd_util.erl
+++ b/lib/inets/src/http_server/httpd_util.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -206,9 +206,6 @@ message(413, Reason,_) ->
"Entity: " ++ html_encode(Reason);
message(414,ReasonPhrase,_) ->
"Message " ++ html_encode(ReasonPhrase) ++ ".";
-message(416,ReasonPhrase,_) ->
- html_encode(ReasonPhrase);
-
message(500,_,ConfigDB) ->
ServerAdmin=lookup(ConfigDB,server_admin,"unknown@unknown"),
"The server encountered an internal error or "
@@ -233,7 +230,9 @@ message(501,{Method, RequestURI, HTTPVersion}, _ConfigDB) ->
end;
message(503, String, _ConfigDB) ->
- "This service in unavailable due to: " ++ html_encode(String).
+ "This service in unavailable due to: " ++ html_encode(String);
+message(_, ReasonPhrase, _) ->
+ html_encode(ReasonPhrase).
maybe_encode(URI) ->
Decoded = try http_uri:decode(URI) of