diff options
author | Micael Karlberg <[email protected]> | 2011-11-18 10:24:50 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2011-11-18 10:24:50 +0100 |
commit | 448b0ce1af748594a9f1c708da491cbdcfeb3498 (patch) | |
tree | 049847b041fc00c00be937d9556d11039e0970a6 /lib/inets/src/http_server/mod_log.erl | |
parent | ac59f1fae260d24ea23f577b739101ad64ffa4fa (diff) | |
parent | 20199ca88ef233a2661d680f0749d1f57a34ba65 (diff) | |
download | otp-448b0ce1af748594a9f1c708da491cbdcfeb3498.tar.gz otp-448b0ce1af748594a9f1c708da491cbdcfeb3498.tar.bz2 otp-448b0ce1af748594a9f1c708da491cbdcfeb3498.zip |
Merge branch 'bmk/inets/httpd/content_len_in_mod_log/OTP-9715'
Diffstat (limited to 'lib/inets/src/http_server/mod_log.erl')
-rw-r--r-- | lib/inets/src/http_server/mod_log.erl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/inets/src/http_server/mod_log.erl b/lib/inets/src/http_server/mod_log.erl index c8a2ec0dc4..62faa285df 100644 --- a/lib/inets/src/http_server/mod_log.erl +++ b/lib/inets/src/http_server/mod_log.erl @@ -100,7 +100,7 @@ do(Info) -> transfer_log(Info,"-",AuthUser,Date,StatusCode,Size), {proceed,Info#mod.data}; {response, Head, _Body} -> - Size = proplists:get_value(content_length,Head,unknown), + Size = content_length(Head), Code = proplists:get_value(code,Head,unknown), transfer_log(Info, "-", AuthUser, Date, Code, Size), {proceed, Info#mod.data}; @@ -254,4 +254,10 @@ auth_user(Data) -> RemoteUser end. - +content_length(Head) -> + case proplists:get_value(content_length, Head) of + undefined -> + unknown; + Size -> + list_to_integer(Size) + end. |