From 710fd97b8d88bc7a3cc8ba603c0f27ab007834ed Mon Sep 17 00:00:00 2001 From: dbs Date: Thu, 28 Jan 2010 01:20:30 +0000 Subject: [PATCH] Prevent WebKit-based browsers (Chrome and Safari) from requesting multipart "You want the multipart? YOU CAN'T HANDLE THE MULTIPART!" git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1904 9efc2488-bf62-4759-914b-345cdb29e865 --- src/javascript/opensrf_xhr.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/javascript/opensrf_xhr.js b/src/javascript/opensrf_xhr.js index 8cace89..f69f4d3 100644 --- a/src/javascript/opensrf_xhr.js +++ b/src/javascript/opensrf_xhr.js @@ -49,8 +49,9 @@ OpenSRF.XHRequest.prototype.send = function() { } 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) -- 2.43.2