[CalendarServer-changes] [14182] CalDAVTester/trunk/verifiers/jsonPointerMatch.py
source_changes at macosforge.org
source_changes at macosforge.org
Mon Nov 17 08:53:58 PST 2014
Revision: 14182
http://trac.calendarserver.org//changeset/14182
Author: cdaboo at apple.com
Date: 2014-11-17 08:53:58 -0800 (Mon, 17 Nov 2014)
Log Message:
-----------
Make sure JSON tests work with content-types that end with "+json".
Modified Paths:
--------------
CalDAVTester/trunk/verifiers/jsonPointerMatch.py
Modified: CalDAVTester/trunk/verifiers/jsonPointerMatch.py
===================================================================
--- CalDAVTester/trunk/verifiers/jsonPointerMatch.py 2014-11-17 15:45:46 UTC (rev 14181)
+++ CalDAVTester/trunk/verifiers/jsonPointerMatch.py 2014-11-17 16:53:58 UTC (rev 14182)
@@ -44,8 +44,8 @@
return False, " No response body"
# Must be application/json
- ct = response.msg.getheaders("content-type")
- if ct[0].split(";")[0] != "application/json":
+ ct = response.msg.getheaders("content-type")[0].split(";")[0]
+ if ct != "application/json" and not ct.endswith("+json"):
return False, " Wrong Content-Type: %s" % (ct,)
# Read in json
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20141117/1b9802d3/attachment.html>
More information about the calendarserver-changes
mailing list