bigboard r7414 - trunk/bigboard/httplib2
- From: marinaz svn gnome org
- To: svn-commits-list gnome org
- Subject: bigboard r7414 - trunk/bigboard/httplib2
- Date: Tue, 1 Jul 2008 19:02:17 +0000 (UTC)
Author: marinaz
Date: Tue Jul 1 19:02:17 2008
New Revision: 7414
URL: http://svn.gnome.org/viewvc/bigboard?rev=7414&view=rev
Log:
Handle well an empty field returned for a date in the http response.
Modified:
trunk/bigboard/httplib2/__init__.py
Modified: trunk/bigboard/httplib2/__init__.py
==============================================================================
--- trunk/bigboard/httplib2/__init__.py (original)
+++ trunk/bigboard/httplib2/__init__.py Tue Jul 1 19:02:17 2008
@@ -285,7 +285,7 @@
retval = "STALE"
elif cc.has_key('only-if-cached'):
retval = "FRESH"
- elif response_headers.has_key('date'):
+ elif response_headers.has_key('date') and response_headers['date'].strip() is not "":
date = calendar.timegm(email.Utils.parsedate_tz(response_headers['date']))
now = time.time()
current_age = max(0, now - date)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]