2017-09-07 00:38:23 +03:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
interface LoadInfo;
|
|
|
|
interface MozChannel;
|
2017-09-28 04:15:39 +03:00
|
|
|
interface TabParent;
|
2017-09-07 00:38:23 +03:00
|
|
|
interface URI;
|
|
|
|
interface nsISupports;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Load types that correspond to the external types in nsIContentPolicy.idl.
|
|
|
|
* Please also update that IDL when updating this list.
|
|
|
|
*/
|
|
|
|
enum MozContentPolicyType {
|
|
|
|
"main_frame",
|
|
|
|
"sub_frame",
|
|
|
|
"stylesheet",
|
|
|
|
"script",
|
|
|
|
"image",
|
|
|
|
"object",
|
|
|
|
"object_subrequest",
|
|
|
|
"xmlhttprequest",
|
|
|
|
"fetch",
|
|
|
|
"xbl",
|
|
|
|
"xslt",
|
|
|
|
"ping",
|
|
|
|
"beacon",
|
|
|
|
"xml_dtd",
|
|
|
|
"font",
|
|
|
|
"media",
|
|
|
|
"websocket",
|
|
|
|
"csp_report",
|
|
|
|
"imageset",
|
|
|
|
"web_manifest",
|
2018-03-24 01:27:08 +03:00
|
|
|
"speculative",
|
2017-09-07 00:38:23 +03:00
|
|
|
"other"
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A thin wrapper around nsIChannel and nsIHttpChannel that allows JS
|
|
|
|
* callers to access them without XPConnect overhead.
|
|
|
|
*/
|
2018-10-21 03:05:38 +03:00
|
|
|
[ChromeOnly, Exposed=Window]
|
2017-09-26 23:38:54 +03:00
|
|
|
interface ChannelWrapper : EventTarget {
|
2017-09-07 00:38:23 +03:00
|
|
|
/**
|
|
|
|
* Returns the wrapper instance for the given channel. The same wrapper is
|
|
|
|
* always returned for a given channel.
|
|
|
|
*/
|
|
|
|
static ChannelWrapper get(MozChannel channel);
|
|
|
|
|
2018-05-22 21:19:57 +03:00
|
|
|
/**
|
|
|
|
* Returns the wrapper instance for the given channel. The same wrapper is
|
|
|
|
* always returned for a given channel.
|
|
|
|
*/
|
2018-05-25 23:41:19 +03:00
|
|
|
static ChannelWrapper? getRegisteredChannel(unsigned long long aChannelId,
|
2018-05-22 21:19:57 +03:00
|
|
|
WebExtensionPolicy extension,
|
|
|
|
TabParent? tabParent);
|
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* A unique ID for for the requests which remains constant throughout the
|
|
|
|
* redirect chain.
|
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
[Constant, StoreInSlot]
|
|
|
|
readonly attribute unsigned long long id;
|
|
|
|
|
|
|
|
// Not technically pure, since it's backed by a weak reference, but if JS
|
|
|
|
// has a reference to the previous value, we can depend on it not being
|
|
|
|
// collected.
|
|
|
|
[Pure]
|
|
|
|
attribute MozChannel? channel;
|
|
|
|
|
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* Cancels the request with the given nsresult status code.
|
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
[Throws]
|
|
|
|
void cancel(unsigned long result);
|
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* Redirects the wrapped HTTP channel to the given URI. For other channel
|
|
|
|
* types, this method will throw. The redirect is an internal redirect, and
|
2017-12-08 23:12:37 +03:00
|
|
|
* the behavior is the same as nsIHttpChannel.redirectTo.
|
2017-09-23 04:00:39 +03:00
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
[Throws]
|
|
|
|
void redirectTo(URI url);
|
|
|
|
|
2017-12-08 23:12:37 +03:00
|
|
|
/**
|
|
|
|
* Requests an upgrade of the HTTP channel to a secure request. For other channel
|
|
|
|
* types, this method will throw. The redirect is an internal redirect, and
|
|
|
|
* the behavior is the same as nsIHttpChannel.upgradeToSecure. Setting this
|
|
|
|
* flag is only effective during the WebRequest.onBeforeRequest in
|
|
|
|
* Web Extensions, calling this at any other point during the request will
|
|
|
|
* have no effect. Setting this flag in addition to calling redirectTo
|
|
|
|
* results in the redirect happening rather than the upgrade request.
|
|
|
|
*/
|
|
|
|
[Throws]
|
|
|
|
void upgradeToSecure();
|
2017-09-07 00:38:23 +03:00
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* The content type of the request, usually as read from the Content-Type
|
|
|
|
* header. This should be used in preference to the header to determine the
|
|
|
|
* content type of the channel.
|
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
[Pure]
|
|
|
|
attribute ByteString contentType;
|
|
|
|
|
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* For HTTP requests, the request method (e.g., GET, POST, HEAD). For other
|
|
|
|
* request types, returns an empty string.
|
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
[Cached, Pure]
|
|
|
|
readonly attribute ByteString method;
|
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* For requests with LoadInfo, the content policy type that corresponds to
|
|
|
|
* the request. For requests without LoadInfo, returns "other".
|
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
[Cached, Pure]
|
|
|
|
readonly attribute MozContentPolicyType type;
|
|
|
|
|
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* When true, the request is currently suspended by the wrapper. When false,
|
|
|
|
* the request is not suspended by the wrapper, but may still be suspended
|
|
|
|
* by another caller.
|
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
[Pure, SetterThrows]
|
|
|
|
attribute boolean suspended;
|
|
|
|
|
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* The final URI of the channel (as returned by NS_GetFinalChannelURI) after
|
|
|
|
* any redirects have been processed.
|
|
|
|
*/
|
2017-09-28 04:15:12 +03:00
|
|
|
[Cached, Pure]
|
2017-09-07 00:38:23 +03:00
|
|
|
readonly attribute URI finalURI;
|
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* The string version of finalURI (but cheaper to access than
|
|
|
|
* finalURI.spec).
|
|
|
|
*/
|
2017-09-28 04:15:12 +03:00
|
|
|
[Cached, Pure]
|
|
|
|
readonly attribute DOMString finalURL;
|
2017-09-07 00:38:23 +03:00
|
|
|
|
|
|
|
|
2017-09-28 04:15:12 +03:00
|
|
|
/**
|
|
|
|
* Returns true if the request matches the given request filter, and the
|
|
|
|
* given extension has permission to access it.
|
|
|
|
*/
|
|
|
|
boolean matches(optional MozRequestFilter filter,
|
|
|
|
optional WebExtensionPolicy? extension = null,
|
|
|
|
optional MozRequestMatchOptions options);
|
2017-09-07 00:38:23 +03:00
|
|
|
|
|
|
|
|
2017-09-28 04:15:39 +03:00
|
|
|
/**
|
|
|
|
* Register's this channel as traceable by the given add-on when accessed
|
|
|
|
* via the process of the given TabParent.
|
|
|
|
*/
|
|
|
|
void registerTraceableChannel(WebExtensionPolicy extension, TabParent? tabParent);
|
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* The current HTTP status code of the request. This will be 0 if a response
|
|
|
|
* has not yet been received, or if the request is not an HTTP request.
|
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
[Cached, Pure]
|
|
|
|
readonly attribute unsigned long statusCode;
|
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* The HTTP status line for the request (e.g., "HTTP/1.0 200 Success"). This
|
|
|
|
* will be an empty string if a response has not yet been received, or if
|
|
|
|
* the request is not an HTTP request.
|
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
[Cached, Pure]
|
|
|
|
readonly attribute ByteString statusLine;
|
|
|
|
|
|
|
|
|
2017-09-23 04:43:18 +03:00
|
|
|
/**
|
|
|
|
* If the request has failed or been canceled, an opaque string representing
|
|
|
|
* the error. For requests that failed at the NSS layer, this is an NSS
|
|
|
|
* error message. For requests that failed for any other reason, it is the
|
|
|
|
* name of an nsresult error code. For requests which haven't failed, this
|
|
|
|
* is null.
|
|
|
|
*
|
|
|
|
* This string is used in the error message when notifying extension
|
|
|
|
* webRequest listeners of failure. The documentation specifically states
|
|
|
|
* that this value MUST NOT be parsed, and is only meant to be displayed to
|
|
|
|
* humans, but we all know how that works in real life.
|
|
|
|
*/
|
|
|
|
[Cached, Pure]
|
|
|
|
readonly attribute DOMString? errorString;
|
|
|
|
|
2017-09-26 23:38:54 +03:00
|
|
|
/**
|
|
|
|
* Dispatched when the channel is closed with an error status. Check
|
|
|
|
* errorString for the error details.
|
|
|
|
*/
|
|
|
|
attribute EventHandler onerror;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Checks the request's current status and dispatches an error event if the
|
|
|
|
* request has failed and one has not already been dispatched.
|
|
|
|
*/
|
|
|
|
void errorCheck();
|
|
|
|
|
2017-09-23 04:43:18 +03:00
|
|
|
|
2017-09-26 23:39:30 +03:00
|
|
|
/**
|
|
|
|
* Dispatched when the channel begins receiving data.
|
|
|
|
*/
|
|
|
|
attribute EventHandler onstart;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Dispatched when the channel has finished receiving data.
|
|
|
|
*/
|
|
|
|
attribute EventHandler onstop;
|
|
|
|
|
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* Information about the proxy server which is handling this request, or
|
|
|
|
* null if the request is not proxied.
|
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
[Cached, Frozen, GetterThrows, Pure]
|
|
|
|
readonly attribute MozProxyInfo? proxyInfo;
|
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* For HTTP requests, the IP address of the remote server handling the
|
|
|
|
* request. For other request types, returns null.
|
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
[Cached, Pure]
|
|
|
|
readonly attribute ByteString? remoteAddress;
|
|
|
|
|
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* The LoadInfo object for this channel, if available. Null for channels
|
|
|
|
* without load info, until support for those is removed.
|
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
[Cached, Pure]
|
|
|
|
readonly attribute LoadInfo? loadInfo;
|
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* True if this load was triggered by a system caller. This currently always
|
|
|
|
* false if the request has no LoadInfo or is a top-level document load.
|
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
[Cached, Pure]
|
|
|
|
readonly attribute boolean isSystemLoad;
|
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* The URL of the principal that triggered this load. This is equivalent to
|
|
|
|
* the LoadInfo's triggeringPrincipal, and will only ever be null for
|
|
|
|
* requests without LoadInfo.
|
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
[Cached, Pure]
|
|
|
|
readonly attribute ByteString? originURL;
|
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* The URL of the document loading the content for this request. This is
|
|
|
|
* equivalent to the LoadInfo's loadingPrincipal. This may only ever be null
|
|
|
|
* for top-level requests and requests without LoadInfo.
|
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
[Cached, Pure]
|
|
|
|
readonly attribute ByteString? documentURL;
|
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* The URI version of originURL. Will be null only when originURL is null.
|
|
|
|
*/
|
2017-09-07 07:56:45 +03:00
|
|
|
[Pure]
|
|
|
|
readonly attribute URI? originURI;
|
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* The URI version of documentURL. Will be null only when documentURL is
|
|
|
|
* null.
|
|
|
|
*/
|
2017-09-07 07:56:45 +03:00
|
|
|
[Pure]
|
|
|
|
readonly attribute URI? documentURI;
|
|
|
|
|
2017-09-07 00:38:23 +03:00
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* True if extensions may modify this request. This is currently false only
|
|
|
|
* if the request belongs to a document which has access to the
|
|
|
|
* mozAddonManager API.
|
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
[Cached, GetterThrows, Pure]
|
|
|
|
readonly attribute boolean canModify;
|
|
|
|
|
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* The outer window ID of the frame that the request belongs to, or 0 if it
|
|
|
|
* is a top-level load or does not belong to a document.
|
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
[Cached, Constant]
|
|
|
|
readonly attribute long long windowId;
|
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* The outer window ID of the parent frame of the window that the request
|
|
|
|
* belongs to, 0 if that parent frame is the top-level frame, and -1 if the
|
|
|
|
* request belongs to a top-level frame.
|
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
[Cached, Constant]
|
|
|
|
readonly attribute long long parentWindowId;
|
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* For cross-process requests, the <browser> or <iframe> element to which the
|
|
|
|
* content loading this request belongs. For requests that don't originate
|
|
|
|
* from a remote browser, this is null.
|
2018-04-27 06:37:29 +03:00
|
|
|
*
|
|
|
|
* This is not an Element because those are by default only exposed in
|
|
|
|
* Window, but we're exposed in System.
|
2017-09-23 04:00:39 +03:00
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
[Cached, Pure]
|
|
|
|
readonly attribute nsISupports? browserElement;
|
|
|
|
|
2017-10-10 19:54:22 +03:00
|
|
|
/**
|
|
|
|
* Returns an array of objects that combine the url and frameId from the
|
|
|
|
* ancestorPrincipals and ancestorOuterWindowIDs on loadInfo.
|
|
|
|
* The immediate parent is the first entry, the last entry is always the top
|
|
|
|
* level frame. It will be an empty list for toplevel window loads and
|
|
|
|
* non-subdocument resource loads within a toplevel window. For the latter,
|
|
|
|
* originURL will provide information on what window is doing the load. It
|
|
|
|
* will be null if the request is not associated with a window (e.g. XHR with
|
|
|
|
* mozBackgroundRequest = true).
|
|
|
|
*/
|
|
|
|
[Cached, Frozen, GetterThrows, Pure]
|
|
|
|
readonly attribute sequence<MozFrameAncestorInfo>? frameAncestors;
|
2017-09-07 00:38:23 +03:00
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
2017-09-24 02:25:19 +03:00
|
|
|
* For HTTP requests, returns an array of request headers which will be, or
|
|
|
|
* have been, sent with this request.
|
2017-09-23 04:00:39 +03:00
|
|
|
*
|
|
|
|
* For non-HTTP requests, throws NS_ERROR_UNEXPECTED.
|
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
[Throws]
|
2017-09-24 02:25:19 +03:00
|
|
|
sequence<MozHTTPHeader> getRequestHeaders();
|
2017-09-07 00:38:23 +03:00
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
2017-09-24 02:25:19 +03:00
|
|
|
* For HTTP requests, returns an array of response headers which were
|
|
|
|
* received for this request, in the same format as returned by
|
|
|
|
* getRequestHeaders.
|
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
* Throws NS_ERROR_NOT_AVAILABLE if a response has not yet been received, or
|
|
|
|
* NS_ERROR_UNEXPECTED if the channel is not an HTTP channel.
|
2017-09-24 02:25:19 +03:00
|
|
|
*
|
|
|
|
* Note: The Content-Type header is handled specially. That header is
|
|
|
|
* usually not mutable after the request has been received, and the content
|
|
|
|
* type must instead be changed via the contentType attribute. If a caller
|
|
|
|
* attempts to set the Content-Type header via setRequestHeader, however,
|
|
|
|
* that value is assigned to the contentType attribute and its original
|
|
|
|
* string value is cached. That original value is returned in place of the
|
|
|
|
* actual Content-Type header.
|
2017-09-23 04:00:39 +03:00
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
[Throws]
|
2017-09-24 02:25:19 +03:00
|
|
|
sequence<MozHTTPHeader> getResponseHeaders();
|
2017-09-07 00:38:23 +03:00
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* Sets the given request header to the given value, overwriting any
|
|
|
|
* previous value. Setting a header to a null string has the effect of
|
2017-12-05 07:48:54 +03:00
|
|
|
* removing it. If merge is true, then the passed value will be merged
|
|
|
|
* to any existing value that exists for the header. Otherwise, any prior
|
|
|
|
* value for the header will be overwritten. Merge is ignored for headers
|
|
|
|
* that cannot be merged.
|
2017-09-23 04:00:39 +03:00
|
|
|
*
|
|
|
|
* For non-HTTP requests, throws NS_ERROR_UNEXPECTED.
|
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
[Throws]
|
2017-12-05 07:48:54 +03:00
|
|
|
void setRequestHeader(ByteString header,
|
|
|
|
ByteString value,
|
|
|
|
optional boolean merge = false);
|
2017-09-07 00:38:23 +03:00
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* Sets the given response header to the given value, overwriting any
|
|
|
|
* previous value. Setting a header to a null string has the effect of
|
2017-12-05 07:48:54 +03:00
|
|
|
* removing it. If merge is true, then the passed value will be merged
|
|
|
|
* to any existing value that exists for the header (e.g. handling multiple
|
|
|
|
* Set-Cookie headers). Otherwise, any prior value for the header will be
|
|
|
|
* overwritten. Merge is ignored for headers that cannot be merged.
|
2017-09-23 04:00:39 +03:00
|
|
|
*
|
|
|
|
* For non-HTTP requests, throws NS_ERROR_UNEXPECTED.
|
2017-09-24 02:25:19 +03:00
|
|
|
*
|
|
|
|
* Note: The content type header is handled specially by this function. See
|
|
|
|
* getResponseHeaders() for details.
|
2017-09-23 04:00:39 +03:00
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
[Throws]
|
2017-12-05 07:48:54 +03:00
|
|
|
void setResponseHeader(ByteString header,
|
|
|
|
ByteString value,
|
|
|
|
optional boolean merge = false);
|
2017-09-07 00:38:23 +03:00
|
|
|
};
|
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* Information about the proxy server handing a request. This is approximately
|
|
|
|
* equivalent to nsIProxyInfo.
|
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
dictionary MozProxyInfo {
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* The hostname of the server.
|
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
required ByteString host;
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* The TCP port of the server.
|
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
required long port;
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* The type of proxy (e.g., HTTP, SOCKS).
|
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
required ByteString type;
|
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* True if the proxy is responsible for DNS lookups.
|
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
required boolean proxyDNS;
|
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* The authentication username for the proxy, if any.
|
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
ByteString? username = null;
|
|
|
|
|
2017-09-23 04:00:39 +03:00
|
|
|
/**
|
|
|
|
* The timeout, in seconds, before the network stack will failover to the
|
|
|
|
* next candidate proxy server if it has not received a response.
|
|
|
|
*/
|
2017-09-07 00:38:23 +03:00
|
|
|
unsigned long failoverTimeout;
|
|
|
|
};
|
2017-09-27 17:58:17 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* MozFrameAncestorInfo combines loadInfo::AncestorPrincipals with
|
|
|
|
* loadInfo::AncestorOuterWindowIDs for easier access in the WebRequest API.
|
|
|
|
*
|
|
|
|
* url represents the parent of the loading window.
|
|
|
|
* frameId is the outerWindowID for the parent of the loading window.
|
|
|
|
*
|
2019-01-02 16:05:23 +03:00
|
|
|
* For further details see nsILoadInfo.idl and Document::AncestorPrincipals.
|
2017-09-27 17:58:17 +03:00
|
|
|
*/
|
|
|
|
dictionary MozFrameAncestorInfo {
|
|
|
|
required ByteString url;
|
|
|
|
required unsigned long long frameId;
|
|
|
|
};
|
2017-09-28 04:15:12 +03:00
|
|
|
|
2017-09-24 02:25:19 +03:00
|
|
|
/**
|
|
|
|
* Represents an HTTP request or response header.
|
|
|
|
*/
|
|
|
|
dictionary MozHTTPHeader {
|
|
|
|
/**
|
|
|
|
* The case-insensitive, non-case-normalized header name.
|
|
|
|
*/
|
|
|
|
required ByteString name;
|
|
|
|
/**
|
|
|
|
* The header value.
|
|
|
|
*/
|
|
|
|
required ByteString value;
|
|
|
|
};
|
|
|
|
|
2017-09-28 04:15:12 +03:00
|
|
|
/**
|
|
|
|
* An object used for filtering requests.
|
|
|
|
*/
|
|
|
|
dictionary MozRequestFilter {
|
|
|
|
/**
|
|
|
|
* If present, the request only matches if its `type` attribute matches one
|
|
|
|
* of the given types.
|
|
|
|
*/
|
|
|
|
sequence<MozContentPolicyType>? types = null;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* If present, the request only matches if its finalURI matches the given
|
|
|
|
* match pattern set.
|
|
|
|
*/
|
|
|
|
MatchPatternSet? urls = null;
|
|
|
|
};
|
|
|
|
|
|
|
|
dictionary MozRequestMatchOptions {
|
|
|
|
/**
|
|
|
|
* True if we're matching for the proxy portion of a proxied request.
|
|
|
|
*/
|
|
|
|
boolean isProxy = false;
|
|
|
|
};
|