Re: Equivalent for XMLHttpRequest.overrideMimeType() in the world of nsIHttpChannel

2019-09-16 Thread john.bieling--- via dev-platform
Perfect! Having seen that, I also found the "contentType" attribute and its description here: https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIChannel which allows me to mimic the behaviour. Thanks a lot for the pointer! John

Re: Equivalent for XMLHttpRequest.overrideMimeType() in the world of nsIHttpChannel

2019-09-16 Thread Valentin Gosu
The implementation of XMLHttpRequest.overrideMimeType() is here: https://searchfox.org/mozilla-central/rev/d1e33e3e11f559952d7d80e722d26a6cf5dd80ac/dom/xhr/XMLHttpRequestMainThread.cpp#3086-3090 You probably want to do something like this:

Equivalent for XMLHttpRequest.overrideMimeType() in the world of nsIHttpChannel

2019-09-14 Thread john.bieling--- via dev-platform
I am working on a wrapper for nsIHttpChannel with the interface of MLHttpRequest. Mainly to be able to use the codeBbasePrincipal (or ContextPrincipal as it is called now I think) with XHR requests, but without authors having to rewrite their code. This is for Thunderbird Add-Ons, which still