cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r614217 - /incubator/cxf/trunk/rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
Date Tue, 22 Jan 2008 15:32:20 GMT
Author: bimargulies
Date: Tue Jan 22 07:32:16 2008
New Revision: 614217

URL: http://svn.apache.org/viewvc?rev=614217&view=rev
Log:
Fix goofy mishap with parsing MIME headers in JavaScript.

Modified:
    incubator/cxf/trunk/rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js

Modified: incubator/cxf/trunk/rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js?rev=614217&r1=614216&r2=614217&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
(original)
+++ incubator/cxf/trunk/rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
Tue Jan 22 07:32:16 2008
@@ -781,8 +781,12 @@
 				}
 			}
 			seenOneHeader = true;
-			var hparts = headerLine.split(":");
-			headers[hparts[0].toLowerCase()] = org_apache_cxf_trim_string(hparts[1]);
+
+			var colonIndex = headerLine.indexOf(":");
+            var headerName = headerLine.slice(0, colonIndex).toLowerCase();
+            var headerValue = headerLine.substr(colonIndex+1);
+			headers[headerName] = org_apache_cxf_trim_string(headerValue);
+
 			if (parttext.charAt(endX + 1) == '\n')
 				endX++;
 		}



Mime
View raw message