summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2014-07-15 19:13:08 (GMT)
committerNirbheek Chauhan <nirbheek@centricular.com>2014-07-15 19:13:08 (GMT)
commit39d4a4ca8aa4e6213414ba7be0d279fe3bc36ba4 (patch)
treef0072dbe25cba5e7d2cd29fc725785642ba0a440 /src/main.c
parent507f8c8a73e2f373c2b50db6490688689fc88517 (diff)
downloadsoup-transcoding-proxy-39d4a4ca8aa4e6213414ba7be0d279fe3bc36ba4.zip
soup-transcoding-proxy-39d4a4ca8aa4e6213414ba7be0d279fe3bc36ba4.tar.gz
server: Set headers such that browsers don't try to cache the stream
Firefox in particular caches the stream very aggressively
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 3b9c243..686d20c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -354,6 +354,15 @@ nostreamheader:
* won't be completed till we call soup_message_body_complete() */
soup_message_set_status (msg, SOUP_STATUS_OK);
+ /* Make sure that browsers never cache our responses */
+ soup_message_headers_append (msg->response_headers,
+ "Cache-Control",
+ "no-cache, no-store, must-revalidate");
+ soup_message_headers_append (msg->response_headers,
+ "Pragma", "no-cache");
+ soup_message_headers_append (msg->response_headers,
+ "Expires", "0");
+
out:
gst_object_unref (template);
gst_object_unref (srcpad);