[svn-commits] mnicholson: testsuite/asterisk/trunk r109 - /asterisk/trunk/asttest/lua/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Mar 22 12:18:29 CDT 2010


Author: mnicholson
Date: Mon Mar 22 12:18:25 2010
New Revision: 109

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=109
Log:
modified manager header parsing patterns to properly parse lines with mutliple colons in them

Modified:
    asterisk/trunk/asttest/lua/astlib.lua

Modified: asterisk/trunk/asttest/lua/astlib.lua
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/asttest/lua/astlib.lua?view=diff&rev=109&r1=108&r2=109
==============================================================================
--- asterisk/trunk/asttest/lua/astlib.lua (original)
+++ asterisk/trunk/asttest/lua/astlib.lua Mon Mar 22 12:18:25 2010
@@ -409,7 +409,7 @@
 		return nil, err
 	end
 
-	local header, value = line:match("(.+): (.+)")
+	local header, value = line:match("([^:]+): (.+)")
 	if not header then
 		return nil, "error parsing message: " .. line
 	end
@@ -441,7 +441,7 @@
 
 		-- don't attempt to match headers when in data mode
 		if not data_mode then
-			header, value = line:match("(.+): ?(.*)")
+			header, value = line:match("([^:]+): ?(.*)")
 		else
 			header, value = nil, nil
 		end




More information about the svn-commits mailing list