| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // GZipFilter applies gzip and deflate content encoding/decoding to a data | 5 // GZipFilter applies gzip and deflate content encoding/decoding to a data |
| 6 // stream. As specified by HTTP 1.1, with gzip encoding the content is | 6 // stream. As specified by HTTP 1.1, with gzip encoding the content is |
| 7 // wrapped with a gzip header, and with deflate encoding the content is in | 7 // wrapped with a gzip header, and with deflate encoding the content is in |
| 8 // a raw, headerless DEFLATE stream. | 8 // a raw, headerless DEFLATE stream. |
| 9 // | 9 // |
| 10 // Internally GZipFilter uses zlib inflate to do decoding. | 10 // Internally GZipFilter uses zlib inflate to do decoding. |
| 11 // | 11 // |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 | 129 |
| 130 // For robustness, when we see the solo sdch filter, we chain in a gzip filter | 130 // For robustness, when we see the solo sdch filter, we chain in a gzip filter |
| 131 // in front of it, with this flag to indicate that the gzip decoding might not | 131 // in front of it, with this flag to indicate that the gzip decoding might not |
| 132 // be needed. This handles a strange case where "Content-Encoding: sdch,gzip" | 132 // be needed. This handles a strange case where "Content-Encoding: sdch,gzip" |
| 133 // is reduced by an errant proxy to "Content-Encoding: sdch", while the | 133 // is reduced by an errant proxy to "Content-Encoding: sdch", while the |
| 134 // content is indeed really gzipped result of sdch :-/. | 134 // content is indeed really gzipped result of sdch :-/. |
| 135 // If this flag is set, then we will revert to being a pass through filter if | 135 // If this flag is set, then we will revert to being a pass through filter if |
| 136 // we don't get a valid gzip header. | 136 // we don't get a valid gzip header. |
| 137 bool possible_sdch_pass_through_; | 137 bool possible_sdch_pass_through_; |
| 138 | 138 |
| 139 DISALLOW_EVIL_CONSTRUCTORS(GZipFilter); | 139 DISALLOW_COPY_AND_ASSIGN(GZipFilter); |
| 140 }; | 140 }; |
| 141 | 141 |
| 142 #endif // NET_BASE_GZIP_FILTER_H__ | 142 #endif // NET_BASE_GZIP_FILTER_H__ |
| OLD | NEW |