Sfoglia il codice sorgente

convert content type to lowercase

Gildas 7 anni fa
parent
commit
2ab16423a4
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      lib/single-file/single-file-browser.js

+ 1 - 1
lib/single-file/single-file-browser.js

@@ -80,7 +80,7 @@ this.SingleFile = this.SingleFile || (() => {
 			}
 			let contentType = resourceContent.headers && resourceContent.headers.get("content-type");
 			if (contentType) {
-				contentType = contentType.match(/^([^;]*)/)[0];
+				contentType = contentType.match(/^([^;]*)/)[0].toLowerCase();
 				if (contentType.indexOf("/") <= 0) {
 					contentType = null;
 				}