aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_server
diff options
context:
space:
mode:
authorVance Shipley <[email protected]>2017-07-07 12:55:54 +0530
committerVance Shipley <[email protected]>2017-07-07 12:55:54 +0530
commit36e87aae5974a6add3e269aafac2bab889f1faab (patch)
tree2b2ffcf32defde7e3fae88761e318eb17ae42212 /lib/inets/src/http_server
parentb6afef4b4d1bc5705ba1c838e3f546c454de47c8 (diff)
downloadotp-36e87aae5974a6add3e269aafac2bab889f1faab.tar.gz
otp-36e87aae5974a6add3e269aafac2bab889f1faab.tar.bz2
otp-36e87aae5974a6add3e269aafac2bab889f1faab.zip
Log actual http status code of response.
The status code provided by other modules was being ignored and 200 (OK) was logged for all responses.
Diffstat (limited to 'lib/inets/src/http_server')
-rw-r--r--lib/inets/src/http_server/mod_log.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/inets/src/http_server/mod_log.erl b/lib/inets/src/http_server/mod_log.erl
index ad7e9713d9..ec570504be 100644
--- a/lib/inets/src/http_server/mod_log.erl
+++ b/lib/inets/src/http_server/mod_log.erl
@@ -105,8 +105,8 @@ do(Info) ->
Code = proplists:get_value(code,Head,unknown),
transfer_log(Info, "-", AuthUser, Date, Code, Size),
{proceed, Info#mod.data};
- {_StatusCode, Response} ->
- transfer_log(Info,"-",AuthUser,Date,200,
+ {StatusCode, Response} ->
+ transfer_log(Info, "-", AuthUser, Date, StatusCode,
httpd_util:flatlength(Response)),
{proceed,Info#mod.data};
undefined ->