Open Bug 622871 Opened 14 years ago Updated 2 years ago

Exception logged for successful call to nsIHttpChannel.getResponseHeader() at http-on-examine-response event

Categories

(Firefox :: General, defect)

4.0 Branch
x86
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: mozilla, Unassigned)

Details

User-Agent:       Mozilla/5.0 (X11; Linux i686; rv:2.0b8pre) Gecko/20101013 Firefox/4.0b8pre
Build Identifier: Mozilla/5.0 (X11; Linux i686; rv:2.0b8pre) Gecko/20101013 Firefox/4.0b8pre

In some situations, a call to getResponseHeader("Content-Type") in the observer for http-on-examine-response returns the correct content type, but also sends a NS_ERROR_NOT_AVAILABLE to the error console.

Reproducible: Sometimes

Steps to Reproduce:
1. Observe http-on-examine-response from a component
2. When triggered, call getResponseHeader("Content-Type")
3. Output the content type
Actual Results:  
Correct content type for the response is output, and the error console gets an exception reporting NS_ERROR_NOT_AVAILABLE from the call to getResponseHeader.

Expected Results:  
Return the correct content type without error messages.

This doesn't happen with every request.  The ones where I can get it to happen reliably involve a content type of application/x-bittorrent where a content-disposition header is also present (at btmon.com).  No errors are reported for text/html responses from anywhere that I have seen.  When a call to getResponseHeader has been made on a different web server (no content-disposition header) and returned application/x-bittorrent without error then the original website no longer generates errors.

The calls that generate errors are on content which would be sent to an external handler or for download.  Calls that are handled internally by Firefox do not generate errors.

Is this another instance of handled exceptions inside C++ generating console messages when results are returned to Javascript?
Version: unspecified → 4.0 Branch
Experiencing same problem here, when receiving EventSource ack, my observer on http-on-examine-response can't retrieve the 'text/event-stream' header.
Mozilla XULRunner 6.0.2 - 20110902133214
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.