[CalendarServer-changes] [9730] CalendarServer/trunk/contrib/tools/request_monitor.py

source_changes at macosforge.org source_changes at macosforge.org
Mon Aug 20 08:19:44 PDT 2012


Revision: 9730
          http://trac.macosforge.org/projects/calendarserver/changeset/9730
Author:   cdaboo at apple.com
Date:     2012-08-20 08:19:42 -0700 (Mon, 20 Aug 2012)
Log Message:
-----------
Quick fix to not fail when extended item value is quoted and has space in it. This needs to be properly fixed by handling
quoted values in the k=v extended items.

Modified Paths:
--------------
    CalendarServer/trunk/contrib/tools/request_monitor.py

Modified: CalendarServer/trunk/contrib/tools/request_monitor.py
===================================================================
--- CalendarServer/trunk/contrib/tools/request_monitor.py	2012-08-17 21:54:13 UTC (rev 9729)
+++ CalendarServer/trunk/contrib/tools/request_monitor.py	2012-08-20 15:19:42 UTC (rev 9730)
@@ -266,8 +266,9 @@
         endPos = line.find(' ', startPos)
         extended["or"] = int(line[startPos:endPos])
     else:
+        
         items = line[startPos:].split()
-        extended = dict([item.split('=') for item in items])
+        extended = dict([item.split('=') for item in items if item.find("=") != -1])
 
     return userId, logTime, method, uri, status, bytes, referer, client, extended
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120820/31323874/attachment.html>


More information about the calendarserver-changes mailing list