Sfoglia il codice sorgente

Removed Content-Type header from upload test because it triggered bugs in some browsers

adolfintel 7 anni fa
parent
commit
e01f4fa40b
2 ha cambiato i file con 2 aggiunte e 6 eliminazioni
  1. 2 6
      Frontend/speedtest_worker.js
  2. 0 0
      Frontend/speedtest_worker.min.js

+ 2 - 6
Frontend/speedtest_worker.js

@@ -478,9 +478,7 @@ function ulTest(done) {
 						try{
 							xhr[i].setRequestHeader("Content-Encoding", "identity"); // disable compression (some browsers may refuse it, but data is incompressible anyway)
 						}catch(e){}
-						try{
-							xhr[i].setRequestHeader("Content-Type", "application/octet-stream"); //force content-type to application/octet-stream in case the server misinterprets it
-						}catch(e){}
+						//No Content-Type header in MPOT branch because it triggers bugs in some browsers
 						xhr[i].send(reqsmall);
 					} else {
 						// REGULAR version, no workaround
@@ -516,9 +514,7 @@ function ulTest(done) {
 						try{
 							xhr[i].setRequestHeader("Content-Encoding", "identity"); // disable compression (some browsers may refuse it, but data is incompressible anyway)
 						}catch(e){}
-						try{
-							xhr[i].setRequestHeader("Content-Type", "application/octet-stream"); //force content-type to application/octet-stream in case the server misinterprets it
-						}catch(e){}
+						//No Content-Type header in MPOT branch because it triggers bugs in some browsers
 						xhr[i].send(req);
 					}
 				}.bind(this),

File diff suppressed because it is too large
+ 0 - 0
Frontend/speedtest_worker.min.js


Some files were not shown because too many files changed in this diff