[CalendarServer-changes] [7047] CalendarServer/trunk/twistedcaldav/extensions.py
source_changes at macosforge.org
source_changes at macosforge.org
Fri Feb 18 10:02:37 PST 2011
Revision: 7047
http://trac.macosforge.org/projects/calendarserver/changeset/7047
Author: sagen at apple.com
Date: 2011-02-18 10:02:37 -0800 (Fri, 18 Feb 2011)
Log Message:
-----------
Encode matchType to utf-8 string so that we don't run into unexpected str->unicode promotion downstream.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/extensions.py
Modified: CalendarServer/trunk/twistedcaldav/extensions.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/extensions.py 2011-02-18 15:47:02 UTC (rev 7046)
+++ CalendarServer/trunk/twistedcaldav/extensions.py 2011-02-18 18:02:37 UTC (rev 7047)
@@ -334,7 +334,7 @@
log.warn(msg)
raise HTTPError(StatusResponse(responsecode.BAD_REQUEST, msg))
caseless = (caseless == "yes")
- matchType = match.attributes.get("match-type", "contains")
+ matchType = match.attributes.get("match-type", u"contains").encode("utf-8")
if matchType not in ("starts-with", "contains", "equals"):
msg = "Bad XML: unknown value for match-type attribute: %s" % (matchType,)
log.warn(msg)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110218/91411c4c/attachment-0001.html>
More information about the calendarserver-changes
mailing list