Interface nsIHttpProtocolHandlerType

Hierarchy

Properties

appName: string

Get the application name.

Returns

The name of this application (eg. "Mozilla").

appVersion: string

Get the application version string.

Returns

The complete version (major and minor) string. (eg. "5.0")

misc: string

Get the application comment misc portion.

oscpu: string

Get the current oscpu.

Returns

The oscpu this application is running on

platform: string

Get the current platform.

Returns

The platform this application is running on (eg. "Windows", "Macintosh", "X11")

rfpUserAgent: string

Get the HTTP advertised user agent string.

scheme: string

The scheme of this protocol (e.g., "file").

userAgent: string

Get the HTTP advertised user agent string.

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

  • This function is used to ensure HSTS data storage is ready to read after the returned promise is resolved. Note that this function should only used for testing. See bug 1521729 for more details.

    Returns any

  • A C++ friendly version of EnsureHSTSDataReady

    Parameters

    • aCallback: HSTSDataCallbackWrapperAlreadyAddRefed

    Returns void

  • 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

  • Allows a protocol to override blacklisted ports.

    This method will be called when there is an attempt to connect to a port that is blacklisted. For example, for most protocols, port 25 (Simple Mail Transfer) is banned. When a URI containing this "known-to-do-bad-things" port number is encountered, this function will be called to ask if the protocol handler wants to override the ban.

    Parameters

    • port: number
    • scheme: string

    Returns boolean

  • Clears the CORS preflight cache.

    Returns void

  • Constructs a new channel from the given URI for this protocol handler and sets the loadInfo for the constructed channel.

    Parameters

    • aURI: nsIURI
    • aLoadinfo: nsILoadInfo

    Returns nsIChannel

  • Create a new channel with the given proxyInfo

    Parameters

    • uri: nsIURI

      the channel uri

    • proxyInfo: nsIProxyInfo

      any proxy information that has already been determined, or null if channel should later determine the proxy on its own using proxyResolveFlags/proxyURI

    • proxyResolveFlags: number

      used if the proxy is later determined from nsIProtocolProxyService::asyncResolve

    • proxyURI: nsIURI

      used if the proxy is later determined from nsIProtocolProxyService::asyncResolve with this as the proxyURI name. Generally this is the same as uri (or null which has the same effect), except in the case of websockets which wants to bootstrap to an http:// channel but make its proxy determination based on a ws:// uri.

    • aLoadInfo: nsILoadInfo

      used to evaluate who initated the resource request.

    Returns nsIChannel

Generated using TypeDoc