Menu

#82 implement XMLHttpRequest.overrideMimeType

closed
None
5
2012-10-21
2005-05-18
No

There are two differing descriptions of XMLHttpRequest,
the one currently supported in version 1.6 described at
http://developer.apple.com/internet/webcontent/xmlhttpreq.html
and another one at
http://xulplanet.com/references/objref/XMLHttpRequest.html.

The latter has at least one additional method (I
haven't done an exhaustive comparison) which therefore
causes htmlunit to fail since it is not defined.
Naturally I'm trying to test a page that uses it.
Copying the description from the page ...

void overrideMimeType ( AUTF8String mimetype )

Override the mime type returned by the server (if any).
This may be used, for example, to force a stream to be
treated and parsed as text/xml, even if the server does
not report it as such. This must be done before the
send method is invoked.

Arguments:
mimetype: The type used to override that returned
by the server (if any).

It would be nice if htmlunit supported this as well.

Discussion

  • Marc Guillemot

    Marc Guillemot - 2006-03-24

    Logged In: YES
    user_id=402164

    I guess that it is not difficult to add. Can you provide a
    unit test? This would make the job easier for us because we
    wouldn't have both to implement and check if the implemented
    behavior is correct.

     
  • Marc Guillemot

    Marc Guillemot - 2006-11-13

    Logged In: YES
    user_id=402164

    Now fixed in SVN.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.