From 0f7bc568e4e180bb69106941c25f40e0eb061576 Mon Sep 17 00:00:00 2001 From: pictuga Date: Wed, 15 Jan 2014 21:02:47 +0100 Subject: [PATCH] Send CGI HTTP headers earlier So that browsers show that sth is going on --- morss/morss.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/morss/morss.py b/morss/morss.py index d29789c..6117643 100644 --- a/morss/morss.py +++ b/morss/morss.py @@ -700,13 +700,14 @@ def cgi_app(environ, start_response): url, cache = Init(url, os.getcwd() + '/cache', options) RSS = Fetch(url, cache, options) - RSS = Gather(RSS, url, cache, options) if headers['content-type'] == 'text/xml': headers['content-type'] = RSS.mimetype start_response(headers['status'], headers.items()) + RSS = Gather(RSS, url, cache, options) + if not DEBUG and not options.silent: return After(RSS, options)