Menu

#1 text/vnd.wap.wml as a accepted mimetype

open
nobody
5
2006-05-23
2006-05-23
Bartt
No

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 );

Discussion


Log in to post a comment.