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
During upgrade to a newer version of htmlunit, my tests have started to fail because uploaded image (test.png) now has incorrect application/octet-stream content type. It looks like image/png type isn't supported by any browser:
Yes you are right, i think this is a bug. Fix is on the way, you can use the next snapshot build if you like.
Because the list of upload mime types depends for real browsers on the operation system and the installed applications at the client side, you are already able to add more mime types (e.g. if you like to simulate a client where MS Office is installed).
Simply call CHROME.registerUploadMimeType("png", "image/png");
or FF60.registerUploadMimeType("png", "image/png");
or
....
before creating the WebClient with the browser.
Hope that helps.
Thanks for the report and for using HtmlUnit.
During upgrade to a newer version of htmlunit, my tests have started to fail because uploaded image (
test.png
) now has incorrectapplication/octet-stream
content type. It looks likeimage/png
type isn't supported by any browser:htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersion.java
Lines 233 to 322 in 537b063
Could you confirm that it's indeed a bug?
Do you see what workaround could be applied in this case (except renaming a file to
test.jpg
)?The text was updated successfully, but these errors were encountered: