[Opensrf-commits] r1910 - branches/rel_1_2/src/javascript (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Jan 28 22:47:39 EST 2010


Author: dbs
Date: 2010-01-28 22:47:37 -0500 (Thu, 28 Jan 2010)
New Revision: 1910

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


Modified: branches/rel_1_2/src/javascript/opensrf_xhr.js
===================================================================
--- branches/rel_1_2/src/javascript/opensrf_xhr.js	2010-01-29 03:16:51 UTC (rev 1909)
+++ branches/rel_1_2/src/javascript/opensrf_xhr.js	2010-01-29 03:47:37 UTC (rev 1910)
@@ -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