You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue initially discussed in #916 is still present in 2.0.7, but likely not in 2.0.6. This is because in the previous version there was an override around the handleResponse method that covered the scenario.
However, in 2.0.7 this override was not only redundant for the most part, but also taxing the performance, and was removed.
I was able to finally track down the source of the problem and it relies on the XMLHttpRequest instead of the window.fetch, and simply mimics the async nature of window.fetch.
fI.prototype.fetch=function(a,b,c){vard=this,e=$ya(a,b,c);<---returnnewPromise(function(f,h){functionl(){if(null==c ? 0 : c.zv)try{varn=d.handleResponse(a,e.status,e.response,c);<---f(n)}catch(p){h(p)}elsef(d.handleResponse(a,e.status,e.response,c))<---}e.onerror=l;e.onload=l;varm;e.send(null!=(m=b.body) ? m : null)})};
$ya=function(a,b,c){vard=newXMLHttpRequest;if(null==c ? 0 : c.JA)d.onreadystatechange=function(f){c.JA(d,f)};vare;d.open(null!=(e=b.method) ? e : 'GET',a,!0);d.responseType='text';d.withCredentials=!0;if(b.headers)for(a=g.u(Object.entries(b.headers)),b=a.next();!b.done;b=a.next())e=g.u(b.value),b=e.next().value,e=e.next().value,d.setRequestHeader(b,e);returnd};
The solution will be to also override the xhronreadystatechange and onload methods in order to apply any modifications before the data is consumed.
The text was updated successfully, but these errors were encountered:
Opted to restore a previous override method but filtered just for specific cases to reduce overhead, but should finally address the original issue, otherwise I will go with the xhr method as a last resort.
Limited testing showed the issue appears to be corrected, unfortunately every time I need to test this takes about 6h so it can take a long time to nail it down.
The issue initially discussed in #916 is still present in 2.0.7, but likely not in 2.0.6. This is because in the previous version there was an override around the
handleResponse
method that covered the scenario.However, in 2.0.7 this override was not only redundant for the most part, but also taxing the performance, and was removed.
I was able to finally track down the source of the problem and it relies on the
XMLHttpRequest
instead of thewindow.fetch
, and simply mimics the async nature ofwindow.fetch
.The solution will be to also override the
xhr
onreadystatechange
andonload
methods in order to apply any modifications before the data is consumed.The text was updated successfully, but these errors were encountered: