[Opensrf-commits] r1904 - trunk/src/javascript (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Jan 27 20:20:31 EST 2010


Author: dbs
Date: 2010-01-27 20:20:30 -0500 (Wed, 27 Jan 2010)
New Revision: 1904

Modified:
   trunk/src/javascript/opensrf_xhr.js
Log:
Prevent WebKit-based browsers (Chrome and Safari) from requesting multipart

"You want the multipart? YOU CAN'T HANDLE THE MULTIPART!"


Modified: trunk/src/javascript/opensrf_xhr.js
===================================================================
--- trunk/src/javascript/opensrf_xhr.js	2010-01-25 16:31:41 UTC (rev 1903)
+++ trunk/src/javascript/opensrf_xhr.js	2010-01-28 01:20:30 UTC (rev 1904)
@@ -49,8 +49,9 @@
 
     } else {
 
-        if(!navigator.userAgent.match(/mozilla/i)) {
-
+	/* Only Firefox supports multipart calls, but Safari / Chrome include
+           "Mozilla" in their user agent strings... sigh */
+        if(!navigator.userAgent.match(/mozilla/i) || navigator.userAgent.match(/webkit/i)) {
             /* standard asynchronous call */
             xreq.onreadystatechange = function() {
                 if(xreq.readyState == 4)



More information about the opensrf-commits mailing list