Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
6.7.2
-
None
Description
function testA(pInput) { var url = pInput; // this works: 'https://raw.githubusercontent.com/unikong/unikong.github.io/master/img/unikong/heart.png' var xhr_image = new XMLHttpRequest(); xhr_image.open("GET", url, false); xhr_image.responseType = "arraybuffer"; // other types makes no difference xhr_image.onreadystatechange = function() { if (xhr_image.readyState === XMLHttpRequest.DONE) { const image_return = xhr_image.response; // Note: NOT xhr_image.responseText const headers = xhr_image.getAllResponseHeaders(); console.log(headers); } } xhr_image.send(); }
so this unfortunatelly prints ONLY:
so I would expect AT LEAST content-type.
its true that it does not print for this image (for other yes, i dont know for how often it works and not work).
Tho if I upload this picture to ANY online tool to find out MIME, ALL of them works (and works even when i rename the suffix, so I know none of the service does check only by extention):
MIME File Type Checker - HTMLStrip
[Mime Type checker | Site24x7 Tools|https://www.site24x7.com/pt/tools/mime-type-checker.html]
File mime type checker - Online tools (waytolearnx.com)
mimetype.io - Check MIME types from files
CheckFileType.com - Free Online File Type Checker
etc...
its possible that the file is not perfect (I used Windows snip tool to make screenshot of my screen and saved as in mspaint as JPEG)...
but as far as ANY other tool works fine, I would expect QT would too