开发者

"Http channel implementation doesn't support nsIUploadChannel2. An extension has supplied a non-functional http protocol handler"

开发者 https://www.devze.com 2023-01-13 17:22 出处:网络
I\'m writing a Firefox extension that uses lots of XMLHttpRequests, following the pattern of the sample code at MDC. Most of the time this works perfectly, but some of the requests are causing the fol

I'm writing a Firefox extension that uses lots of XMLHttpRequests, following the pattern of the sample code at MDC. Most of the time this works perfectly, but some of the requests are causing the following message to appear in the console:

Http channel implementation doesn't support nsIUploadChannel2. An extension has supplied a non-functionalhttp protocol handler. This will break behavior and in future releases not work at all.

As far as I can tell, my extension is not supplying any new http protocol handler; it's just using what is built into Firefox. It's not another extension, because I tried disabling all other extensions, and got the same result. I also don't see开发者_C百科 any particular pattern for why I get this message for some requests but not others.

What does this message mean, and what, if anything, am I doing wrong?

Edit: This often seems to happen when I'm sending two XmlHttpRequests, one right after the other. I bring this up because I just happened to come across this page about how the browser will only send two requests at once, and will queue up any others internally. So it might be related to that, but I don't know.


Reposting as an anwer:

it turned out this was happening because I was trying to get the source of a page using an XMLHttpRequest to a view-source: URL (bugzilla bug).

As someone on Bugzilla kindly pointed out, this is kind of pointless. I'm now using this technique which is actually doing what I intended -- getting the source from the cache without making a new HTTP request.

0

精彩评论

暂无评论...
验证码 换一张
取 消