[xiph-commits] r18805 - icecast/trunk/icecast/src

ph3-der-loewe at svn.xiph.org ph3-der-loewe at svn.xiph.org
Sat Feb 23 18:04:43 PST 2013


Author: ph3-der-loewe
Date: 2013-02-23 18:04:43 -0800 (Sat, 23 Feb 2013)
New Revision: 18805

Modified:
   icecast/trunk/icecast/src/format_mp3.c
   icecast/trunk/icecast/src/util.c
Log:
send Expires:-headers on all cache=0 requests, close #1870

Modified: icecast/trunk/icecast/src/format_mp3.c
===================================================================
--- icecast/trunk/icecast/src/format_mp3.c	2013-02-24 00:53:09 UTC (rev 18804)
+++ icecast/trunk/icecast/src/format_mp3.c	2013-02-24 02:04:43 UTC (rev 18805)
@@ -679,10 +679,6 @@
         bytes = snprintf (ptr, remaining, "Content-Length: 221183499\r\n");
         remaining -= bytes;
         ptr += bytes;
-        /* avoid browser caching, reported via forum */
-        bytes = snprintf (ptr, remaining, "Expires: Mon, 26 Jul 1997 05:00:00 GMT\r\n");
-        remaining -= bytes;
-        ptr += bytes; 
     }
 
     client->format_data = client_mp3;

Modified: icecast/trunk/icecast/src/util.c
===================================================================
--- icecast/trunk/icecast/src/util.c	2013-02-24 00:53:09 UTC (rev 18804)
+++ icecast/trunk/icecast/src/util.c	2013-02-24 02:04:43 UTC (rev 18805)
@@ -569,7 +569,9 @@
 			      currenttime_buffer,
 			      contenttype_buffer,
 			      (status == 401 ? "WWW-Authenticate: Basic realm=\"Icecast2 Server\"\r\n" : ""),
-                              (cache     ? "" : "Cache-Control: no-cache\r\n"),
+                              (cache     ? "" : "Cache-Control: no-cache\r\n"
+                                                "Expires: Mon, 26 Jul 1997 05:00:00 GMT\r\n"
+                                                "Pragma: no-cache\r\n"),
                               (datablock ? "\r\n" : ""),
                               (datablock ? datablock : ""));
     config_release_config();



More information about the commits mailing list