Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsISupports.idl"
8 interface nsIUTF8StringEnumerator;
9 /**
10 * A channel interface which allows special handling of encoded content
11 */
13 [scriptable, uuid(30d7ec3a-f376-4652-9276-3092ec57abb6)]
14 interface nsIEncodedChannel : nsISupports
15 {
16 /**
17 * This attribute holds the MIME types corresponding to the content
18 * encodings on the channel. The enumerator returns nsISupportsCString
19 * objects. The first one corresponds to the outermost encoding on the
20 * channel and then we work our way inward. "identity" is skipped and not
21 * represented on the list. Unknown encodings make the enumeration stop.
22 * If you want the actual Content-Encoding value, use
23 * getResponseHeader("Content-Encoding").
24 *
25 * When there is no Content-Encoding header, this property is null.
26 *
27 * Modifying the Content-Encoding header on the channel will cause
28 * this enumerator to have undefined behavior. Don't do it.
29 *
30 * Also note that contentEncodings only exist during or after OnStartRequest.
31 * Calling contentEncodings before OnStartRequest is an error.
32 */
33 readonly attribute nsIUTF8StringEnumerator contentEncodings;
35 /**
36 * This attribute controls whether or not content conversion should be
37 * done per the Content-Encoding response header. applyConversion can only
38 * be set before or during OnStartRequest. Calling this during
39 * OnDataAvailable is an error.
40 *
41 * TRUE by default.
42 */
43 attribute boolean applyConversion;
44 };