Description
When loading the RSS a warning is logged in the moin logfile.
Steps to reproduce
Load the RSS Feed from RecentChanges or http:/rss_rc/RecentChanges?action=rss_rc
- Look in the moin.log for the WARNING .
Example
Component selection
- general
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
Problem is still there in MoinMoin 1.8.3 .
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))
- I'm fairly certain the above patch is incomplete. The "sisterpages" action also sets the "Expires" header, so I'm guessing that it will have the same issue. It looks like the right thing to do is have the session object "finish" operation disable caching. Also worth noting that the session handling is disabling the cache completely (expires one day ago), whereas the RSS feed is
set to expire based on configuration. However, in the interim, I'll probably apply the above patch. -- EricJohnson
I hate logs that get filled with bogus warnings, so I am happy with my "patch". I don't use sisterpages on any wiki installation for now. Its certainly better to fix whatever fundamental problem there is. -- 91.23.115.101 2009-05-14 09:11:50
- Problem gone in 1.9.0 .
Plan
- Priority:
- Assigned to:
- Status: user feedback indicates it is fixed since 1.9.0