Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(328)

Side by Side Diff: sdk/lib/io/http.dart

Issue 370743003: Add option to HttpClient to turn of auto uncompression (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review copmments Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.io; 5 part of dart.io;
6 6
7 /** 7 /**
8 * HTTP status codes. 8 * HTTP status codes.
9 */ 9 */
10 abstract class HttpStatus { 10 abstract class HttpStatus {
(...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 * Increasing this number may lower performance and take up unwanted 1230 * Increasing this number may lower performance and take up unwanted
1231 * system resources. 1231 * system resources.
1232 * 1232 *
1233 * To disable, set to `null`. 1233 * To disable, set to `null`.
1234 * 1234 *
1235 * Default is `null`. 1235 * Default is `null`.
1236 */ 1236 */
1237 int maxConnectionsPerHost; 1237 int maxConnectionsPerHost;
1238 1238
1239 /** 1239 /**
1240 * Get and set whether the body of a response will be automatically
1241 * uncompressed.
1242 *
1243 * The body of an HTTP response can be compressed. In most
1244 * situations providing the un-compressed body is most
1245 * convenient. Therefore the default behavior is to un-compress the
1246 * body. However in some situations (e.g. implementing a transparent
1247 * proxy) keeping the uncompressed stream is required.
1248 *
1249 * NOTE: Headers in from the response is never modified. This means
1250 * that when automatic un-compression is turned on the value of the
1251 * header `Content-Length` will reflect the length of the original
1252 * compressed body. Likewise the header `Content-Encoding` will also
1253 * have the original value indicating compression.
1254 *
1255 * NOTE: Automatic un-compression is only performed if the
1256 * `Content-Encoding` header value is `gzip`.
1257 *
1258 * This value affects all responses produced by this client after the
1259 * value is changed.
1260 *
1261 * To disable, set to `false`.
1262 *
1263 * Default is `true`.
1264 */
1265 bool autoUncompress;
1266
1267 /**
1240 * Set and get the default value of the `User-Agent` header for all requests 1268 * Set and get the default value of the `User-Agent` header for all requests
1241 * generated by this [HttpClient]. The default value is 1269 * generated by this [HttpClient]. The default value is
1242 * `Dart/<version> (dart:io)`. 1270 * `Dart/<version> (dart:io)`.
1243 * 1271 *
1244 * If the userAgent is set to `null`, no default `User-Agent` header will be 1272 * If the userAgent is set to `null`, no default `User-Agent` header will be
1245 * added to each request. 1273 * added to each request.
1246 */ 1274 */
1247 String userAgent; 1275 String userAgent;
1248 1276
1249 factory HttpClient() => new _HttpClient(); 1277 factory HttpClient() => new _HttpClient();
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
1925 class RedirectException implements HttpException { 1953 class RedirectException implements HttpException {
1926 final String message; 1954 final String message;
1927 final List<RedirectInfo> redirects; 1955 final List<RedirectInfo> redirects;
1928 1956
1929 const RedirectException(this.message, this.redirects); 1957 const RedirectException(this.message, this.redirects);
1930 1958
1931 String toString() => "RedirectException: $message"; 1959 String toString() => "RedirectException: $message";
1932 1960
1933 Uri get uri => redirects.last.location; 1961 Uri get uri => redirects.last.location;
1934 } 1962 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698