From cd6dcccb7b21d5afe0ff38d901a806e6415c496e Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 11 Jul 2013 16:36:43 -0400 Subject: [PATCH] LP1198983 disable multipart/mixed for Firefox Only allow multipart mixed/replace message within the Evergreen staff client for now. Eventually, multi-part messages will be wholly deprecated. Signed-off-by: Bill Erickson Signed-off-by: Dan Scott --- src/javascript/opensrf_xhr.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/javascript/opensrf_xhr.js b/src/javascript/opensrf_xhr.js index ccc3ffd..382ad3b 100644 --- a/src/javascript/opensrf_xhr.js +++ b/src/javascript/opensrf_xhr.js @@ -48,9 +48,11 @@ OpenSRF.XHRequest.prototype.send = function() { } else { - /* 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) || navigator.userAgent.match(/msie/i)) { + /** + * multi-part messages are deprecated. Eventually this will go away. + * For now, continue allowing the Evergreen staff client to use + * multi-part messages. */ + if (!navigator.userAgent.match(/open_ils_staff_client/)) { /* standard asynchronous call */ xreq.onreadystatechange = function() { if(xreq.readyState == 4) -- 2.43.2