Description

When loading the RSS a warning is logged in the moin logfile.

Steps to reproduce

  1. Load the RSS Feed from RecentChanges or http:/rss_rc/RecentChanges?action=rss_rc

  2. Look in the moin.log for the WARNING .

Example

Component selection

Details

2009-01-19 00:43:01,134 MoinMoin.request WARNING Duplicate http header: 'Expires: Sat, 19 Jan 2008 23:43:01 GMT' (ignored)
2009-01-19 00:43:01,135 MoinMoin.request WARNING Header added first at:
  File "/opt/coolstack/lib/python2.5/site-packages/MoinMoin/server/server_wsgi.py", line 29, in moinmoinApp
    request.run()
  File "/opt/coolstack/lib/python2.5/site-packages/MoinMoin/request/__init__.py", line 1311, in run
    handler(self.page.page_name, self)
  File "/opt/coolstack/lib/python2.5/site-packages/MoinMoin/action/rss_rc.py", line 109, in execute
    request.emit_http_headers(httpheaders)

2009-01-19 00:43:01,135 MoinMoin.request WARNING Header added again at:
  File "/opt/coolstack/lib/python2.5/site-packages/MoinMoin/server/server_wsgi.py", line 28, in moinmoinApp
    request = request_wsgi.Request(environ)
  File "/opt/coolstack/lib/python2.5/site-packages/MoinMoin/request/request_wsgi.py", line 35, in __init__
    RequestBase.__init__(self, {})
  File "/opt/coolstack/lib/python2.5/site-packages/MoinMoin/request/__init__.py", line 220, in __init__
    self.cfg.session_handler.after_auth(self, self.cfg.session_id_handler, self.user)
  File "/opt/coolstack/lib/python2.5/site-packages/MoinMoin/session.py", line 437, in after_auth
    session_id_handler.set(request, session.name, expires)
  File "/opt/coolstack/lib/python2.5/site-packages/MoinMoin/session.py", line 339, in set
    self._set_cookie(request, session_name, expires)
  File "/opt/coolstack/lib/python2.5/site-packages/MoinMoin/session.py", line 335, in _set_cookie
    request.disableHttpCaching()
  File "/opt/coolstack/lib/python2.5/site-packages/MoinMoin/request/__init__.py", line 1604, in disableHttpCaching
    self.setHttpHeader('Expires: %s' % self.httpDate(when=when))

MoinMoin Version

1.8.1

OS and Version

SunOS sun 5.10

Python Version

Python 2.5.2

Server Setup

Apache 2.2 with mod_wsgi 2.3

Server Details

xapian-core-1.0.10 and xapian-bindings-1.0.10

Language you are using the wiki in (set in the browser/UserPreferences)

de

Workaround

Discussion

My Patch for MoinMoin 1.8.1

--- a/MoinMoin/request/__init__.py      2008-10-26 20:26:10.000000000 +0100
+++ b/MoinMoin/request/__init__.py      2009-02-04 09:12:06.000000000 +0100
@@ -1598,7 +1598,7 @@

         # only do this once to avoid 'duplicate header' warnings
         # (in case the caching disabling is being made stricter)
-        if not self.http_caching_disabled:
+        if ((not self.http_caching_disabled) and (self.action != 'rss_rc')):
             # Set Expires for http 1.0 caches (does not support Cache-Control)
             when = time.time() - (3600 * 24 * 365)
             self.setHttpHeader('Expires: %s' % self.httpDate(when=when))

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/1.8.1_RSSGivesWarningLog (last edited 2009-12-13 19:11:51 by ThomasWaldmann)