cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r888231 - in /cxf/branches/2.1.x-fixes: ./ rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
Date Tue, 08 Dec 2009 02:38:30 GMT
Author: dkulp
Date: Tue Dec  8 02:38:30 2009
New Revision: 888231

URL: http://svn.apache.org/viewvc?rev=888231&view=rev
Log:
Merged revisions 886943 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.2.x-fixes

................
  r886943 | dkulp | 2009-12-03 17:05:20 -0500 (Thu, 03 Dec 2009) | 9 lines
  
  Merged revisions 885055 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r885055 | bimargulies | 2009-11-27 19:36:57 -0500 (Fri, 27 Nov 2009) | 1 line
    
    protect against clever people who add extra properties to all arrays in Javascript.
  ........
................

Modified:
    cxf/branches/2.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.1.x-fixes/rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js?rev=888231&r1=888230&r2=888231&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
(original)
+++ cxf/branches/2.1.x-fixes/rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
Tue Dec  8 02:38:30 2009
@@ -714,11 +714,14 @@
 		this.req.setRequestHeader("Content-Type", "text/xml");
 	}
 
-	if (headers) { // must be array indexed by header field.
-		for (var h in headers) {
-			this.req.setRequestHeader(h, headers[h]);
-		}
-	}
+    if (headers) { // must be array indexed by header field.
+        // avoid extra properties on the headers.
+        for (var h in headers) {
+            if(headers.hasOwnProperty(h)) {
+                this.req.setRequestHeader(h, headers[h]);
+            }
+        }
+    }	
 
 	this.req.setRequestHeader("SOAPAction", this.soapAction);
 	this.req.setRequestHeader("MessageType", this.messageType);



Mime
View raw message