aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_server/httpd_response.erl
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2015-10-06 11:03:03 +0200
committerHenrik Nord <[email protected]>2015-10-06 11:03:03 +0200
commit4f9905824002bebc33c2914669b4c364927cb0ee (patch)
treec91cc3e003b406e049c83ae73b208e10912d6df6 /lib/inets/src/http_server/httpd_response.erl
parent02a7407dfefd539b6850c13e1e3f4df9afd715ac (diff)
parenta2c538dee3013bb6285027d9ae45b7f055e8e8eb (diff)
downloadotp-4f9905824002bebc33c2914669b4c364927cb0ee.tar.gz
otp-4f9905824002bebc33c2914669b4c364927cb0ee.tar.bz2
otp-4f9905824002bebc33c2914669b4c364927cb0ee.zip
Merge branch 'maint-18' into maint
Diffstat (limited to 'lib/inets/src/http_server/httpd_response.erl')
-rw-r--r--lib/inets/src/http_server/httpd_response.erl21
1 files changed, 14 insertions, 7 deletions
diff --git a/lib/inets/src/http_server/httpd_response.erl b/lib/inets/src/http_server/httpd_response.erl
index 7e73da7060..71243f525a 100644
--- a/lib/inets/src/http_server/httpd_response.erl
+++ b/lib/inets/src/http_server/httpd_response.erl
@@ -287,14 +287,21 @@ create_header(ConfigDb, KeyValueTupleHeaders) ->
Date = httpd_util:rfc1123_date(),
ContentType = "text/html",
Server = server(ConfigDb),
- Headers0 = add_default_headers([{"date", Date},
- {"content-type", ContentType}
- | if Server=="" -> [];
- true -> [{"server", Server}]
- end
- ],
- KeyValueTupleHeaders),
CustomizeCB = httpd_util:lookup(ConfigDb, customize, httpd_custom),
+
+ CustomDefaults = httpd_custom:response_default_headers(CustomizeCB),
+ SystemDefaultes = ([{"date", Date},
+ {"content-type", ContentType}
+ | if Server=="" -> [];
+ true -> [{"server", Server}]
+ end
+ ]),
+
+ %% System defaults not present in custom defaults will be added
+ %% to defaults
+ Defaults = add_default_headers(SystemDefaultes, CustomDefaults),
+
+ Headers0 = add_default_headers(Defaults, KeyValueTupleHeaders),
lists:filtermap(fun(H) ->
httpd_custom:customize_headers(CustomizeCB, response_header, H)
end,