Interface nsIEncodedChannelType

A channel interface which allows special handling of encoded content

Hierarchy

Properties

applyConversion: boolean

This attribute controls whether or not content conversion should be done per the Content-Encoding response header. applyConversion can only be set before or during OnStartRequest. Calling this during OnDataAvailable is an error.

TRUE by default.

contentEncodings: nsIUTF8StringEnumerator

This attribute holds the MIME types corresponding to the content encodings on the channel. The enumerator returns nsISupportsCString objects. The first one corresponds to the outermost encoding on the channel and then we work our way inward. "identity" is skipped and not represented on the list. Unknown encodings make the enumeration stop. If you want the actual Content-Encoding value, use getResponseHeader("Content-Encoding").

When there is no Content-Encoding header, this property is null.

Modifying the Content-Encoding header on the channel will cause this enumerator to have undefined behavior. Don't do it.

Also note that contentEncodings only exist during or after OnStartRequest. Calling contentEncodings before OnStartRequest is an error.

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • This function will start converters if they are available. aNewNextListener will be nullptr if no converter is available.

    Parameters

    • aNextListener: nsIStreamListener
    • aNewNextListener: nsIStreamListener
    • aCtxt: nsISupports

    Returns void

Generated using TypeDoc