]> granicus.if.org Git - ejabberd/commitdiff
* src/web/ejabberd_web_admin.erl: Include Last-Modified HTTP
authorBadlop <badlop@process-one.net>
Sat, 12 Apr 2008 08:09:05 +0000 (08:09 +0000)
committerBadlop <badlop@process-one.net>
Sat, 12 Apr 2008 08:09:05 +0000 (08:09 +0000)
header in responses to allow caching (EJAB-546)

SVN Revision: 1292

ChangeLog
src/web/ejabberd_web_admin.erl

index b02212b95b3ff620e53373834dadb602e832514e..7dc1aab066ad8fc99513f12f1dcede1de5241c29 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-12  Badlop  <badlop@process-one.net>
+
+       * src/web/ejabberd_web_admin.erl: Include Last-Modified HTTP
+       header in responses to allow caching (EJAB-546)
+
 2008-04-11  Badlop  <badlop@process-one.net>
 
        * src/Makefile.in: Improved indentation of GCC call
index 25ea9d237fa4a00fc87f3dfef447e2715db85d85..abc1ac871c75b7843bb4ec058bf6ad49c9881ec2 100644 (file)
@@ -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"}.