diff options
author | Badlop <badlop@process-one.net> | 2008-04-12 08:09:05 +0000 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2008-04-12 08:09:05 +0000 |
commit | 7c64509c4608b91695030d1a1619cf42e81f61b3 (patch) | |
tree | 3749bea443b52164e5cd540fdf867bc16d35517c /src/web/ejabberd_web_admin.erl | |
parent | * src/Makefile.in: Improved indentation of GCC call (diff) |
* src/web/ejabberd_web_admin.erl: Include Last-Modified HTTP
header in responses to allow caching (EJAB-546)
SVN Revision: 1292
Diffstat (limited to 'src/web/ejabberd_web_admin.erl')
-rw-r--r-- | src/web/ejabberd_web_admin.erl | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/web/ejabberd_web_admin.erl b/src/web/ejabberd_web_admin.erl index 25ea9d237..abc1ac871 100644 --- a/src/web/ejabberd_web_admin.erl +++ b/src/web/ejabberd_web_admin.erl @@ -635,16 +635,16 @@ process_admin(Host, ], Host, Lang); process_admin(Host, #request{path = ["style.css"]}) -> - {200, [{"Content-Type", "text/css"}], css(Host)}; + {200, [{"Content-Type", "text/css"}, last_modified(), cache_control_public()], css(Host)}; process_admin(_Host, #request{path = ["favicon.ico"]}) -> - {200, [{"Content-Type", "image/x-icon"}], favicon()}; + {200, [{"Content-Type", "image/x-icon"}, last_modified(), cache_control_public()], favicon()}; process_admin(_Host, #request{path = ["logo.png"]}) -> - {200, [{"Content-Type", "image/png"}], logo()}; + {200, [{"Content-Type", "image/png"}, last_modified(), cache_control_public()], logo()}; process_admin(_Host, #request{path = ["logo-fill.png"]}) -> - {200, [{"Content-Type", "image/png"}], logo_fill()}; + {200, [{"Content-Type", "image/png"}, last_modified(), cache_control_public()], logo_fill()}; process_admin(Host, #request{path = ["acls-raw"], @@ -2272,3 +2272,7 @@ url_func({users_queue, Prefix, User, _Server}) -> url_func({user, Prefix, User, _Server}) -> Prefix ++ "user/" ++ User ++ "/". +last_modified() -> + {"Last-Modified", "Mon, 25 Feb 2008 13:23:30 GMT"}. +cache_control_public() -> + {"Cache-Control", "public"}. |