[CalendarServer-changes] [3660] CalendarServer/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Thu Feb 12 02:06:42 PST 2009
Revision: 3660
http://trac.macosforge.org/projects/calendarserver/changeset/3660
Author: darla at apple.com
Date: 2009-02-12 02:06:42 -0800 (Thu, 12 Feb 2009)
Log Message:
-----------
Added a Retry-After HTTP header when a 503 is returned. The value is configurable.
Modified Paths:
--------------
CalendarServer/trunk/conf/caldavd-test.plist
CalendarServer/trunk/conf/caldavd.plist
CalendarServer/trunk/twistedcaldav/config.py
CalendarServer/trunk/twistedcaldav/httpfactory.py
Modified: CalendarServer/trunk/conf/caldavd-test.plist
===================================================================
--- CalendarServer/trunk/conf/caldavd-test.plist 2009-02-11 23:35:41 UTC (rev 3659)
+++ CalendarServer/trunk/conf/caldavd-test.plist 2009-02-12 10:06:42 UTC (rev 3660)
@@ -614,6 +614,12 @@
<!-- Support for Content-Encoding compression options as specified in RFC2616 Section 3.5 -->
<key>ResponseCompression</key>
<false/>
+
+ <!-- The retry-after value to return with a 503 error. The value of this field can be either
+ an integer number of seconds (e.g. 180) or an HTTP-date
+ (e.g. Sat, 14 Feb 2009 23:59:59 GMT). -->
+ <key>HTTPRetryAfter</key>
+ <string>180</string>
<!-- A unix socket used for communication between the child and master processes.
An empty value tells the server to use a tcp socket instead. -->
Modified: CalendarServer/trunk/conf/caldavd.plist
===================================================================
--- CalendarServer/trunk/conf/caldavd.plist 2009-02-11 23:35:41 UTC (rev 3659)
+++ CalendarServer/trunk/conf/caldavd.plist 2009-02-12 10:06:42 UTC (rev 3660)
@@ -477,6 +477,12 @@
<!-- Support for Content-Encoding compression options as specified in RFC2616 Section 3.5 -->
<key>ResponseCompression</key>
<true/>
+
+ <!-- The retry-after value to return with a 503 error. The value of this field can be either
+ an integer number of seconds (e.g. 180) or an HTTP-date
+ (e.g. Sat, 14 Feb 2009 23:59:59 GMT). -->
+ <key>HTTPRetryAfter</key>
+ <string>180</string>
</dict>
Modified: CalendarServer/trunk/twistedcaldav/config.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/config.py 2009-02-11 23:35:41 UTC (rev 3659)
+++ CalendarServer/trunk/twistedcaldav/config.py 2009-02-12 10:06:42 UTC (rev 3660)
@@ -386,6 +386,11 @@
# RFC2616 Section 3.5
"ResponseCompression": True,
+ # The retry-after value to return with a 503 error
+ # Can be either a duration (in seconds) or a specific time (e.g.
+ # Fri, 31 Dec 1999 23:59:59 GMT
+ "HTTPRetryAfter": "180",
+
# Profiling options
"Profiling": {
"Enabled": False,
Modified: CalendarServer/trunk/twistedcaldav/httpfactory.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/httpfactory.py 2009-02-11 23:35:41 UTC (rev 3659)
+++ CalendarServer/trunk/twistedcaldav/httpfactory.py 2009-02-12 10:06:42 UTC (rev 3660)
@@ -33,6 +33,7 @@
log.msg(overloaded=self)
self.transport.write("HTTP/1.0 503 Service Unavailable\r\n"
"Content-Type: text/html\r\n"
+ "Retry-After: " + config.HTTPRetryAfter + "\r\n"
"Connection: close\r\n\r\n"
"<html><head><title>503 Service Unavailable</title></head>"
"<body><h1>Service Unavailable</h1>"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090212/eb380630/attachment-0001.html>
More information about the calendarserver-changes
mailing list