aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_server
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2012-02-06 15:26:28 +0100
committerMicael Karlberg <[email protected]>2012-02-06 15:26:28 +0100
commitb2eeb740c6e013055603aaaee1570550d380b720 (patch)
treee332e7f1270c6de2103fc7d163999a27ba4e40e8 /lib/inets/src/http_server
parentdcf35c1ef914f7473bb64fa9175af2cf42744885 (diff)
parent0d580acdc51bd88a0d364b76ac35fcf2506c2d9e (diff)
downloadotp-b2eeb740c6e013055603aaaee1570550d380b720.tar.gz
otp-b2eeb740c6e013055603aaaee1570550d380b720.tar.bz2
otp-b2eeb740c6e013055603aaaee1570550d380b720.zip
Merge branch 'bmk/inets/httpc/checking_ipv6_on_windows' into bmk/inets/inets59_integration
Diffstat (limited to 'lib/inets/src/http_server')
-rw-r--r--lib/inets/src/http_server/mod_get.erl16
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/inets/src/http_server/mod_get.erl b/lib/inets/src/http_server/mod_get.erl
index 5cb30e3d97..c58d1f3508 100644
--- a/lib/inets/src/http_server/mod_get.erl
+++ b/lib/inets/src/http_server/mod_get.erl
@@ -18,9 +18,16 @@
%%
%%
-module(mod_get).
+
-export([do/1]).
+
-include("httpd.hrl").
-include("httpd_internal.hrl").
+-include("inets_internal.hrl").
+
+-define(VMODULE,"GET").
+
+
%% do
do(Info) ->
@@ -84,15 +91,16 @@ send_response(_Socket, _SocketType, Path, Info)->
file:close(FileDescriptor),
{proceed,[{response,{already_sent,200,
FileInfo#file_info.size}},
- {mime_type,MimeType}|Info#mod.data]};
+ {mime_type,MimeType} | Info#mod.data]};
{error, Reason} ->
+ ?hdrt("send_response -> failed open file",
+ [{path, Path}, {reason, Reason}]),
Status = httpd_file:handle_error(Reason, "open", Info, Path),
- {proceed,
- [{status, Status}| Info#mod.data]}
+ {proceed, [{status, Status} | Info#mod.data]}
end.
%% send
-
+
send(#mod{socket = Socket, socket_type = SocketType} = Info,
StatusCode, Headers, FileDescriptor) ->
?DEBUG("send -> send header",[]),