text/vnd.wap.wml as a accepted mimetype
Status: Pre-Alpha
Brought to you by:
jlalexander
After looking at htmlunits source I found where the
mime types are restricted and added logic to
accept 'text/vnd.wap.wml' as a valid type. The test
that I wrote worked as written after this.
To fix I added the following to HTMLSegment in
WebResponse.java:
private static final String WML_CONTENT
= "text/vnd.wap.wml";
And then in the isHTML function:
public boolean isHTML() {
return getContentType().equalsIgnoreCase(
HTML_CONTENT ) ||
getContentType().equalsIgnoreCase(
FAUX_XHTML_CONTENT ) ||
getContentType().equalsIgnoreCase(
XHTML_CONTENT ) ||
getContentType().equalsIgnoreCase(
WML_CONTENT );