From 39d4a4ca8aa4e6213414ba7be0d279fe3bc36ba4 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Wed, 16 Jul 2014 00:43:08 +0530 Subject: server: Set headers such that browsers don't try to cache the stream Firefox in particular caches the stream very aggressively --- src/main.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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); -- cgit v0.11.2-2-gd1dd