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

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

Issue 598453003: Add HttpServer:autoCompress option, to disable auto gzip compression. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix test. Created 6 years, 2 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
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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 * Content-Type: text/plain; charset=utf-8 171 * Content-Type: text/plain; charset=utf-8
172 * X-Frame-Options: SAMEORIGIN 172 * X-Frame-Options: SAMEORIGIN
173 * X-Content-Type-Options: nosniff 173 * X-Content-Type-Options: nosniff
174 * X-XSS-Protection: 1; mode=block 174 * X-XSS-Protection: 1; mode=block
175 * 175 *
176 * If the `Server` header is added here and the `serverHeader` is set as 176 * If the `Server` header is added here and the `serverHeader` is set as
177 * well then the value of `serverHeader` takes precedence. 177 * well then the value of `serverHeader` takes precedence.
178 */ 178 */
179 HttpHeaders get defaultResponseHeaders; 179 HttpHeaders get defaultResponseHeaders;
180 180
181 /**
182 * Whether the [HttpServer] should compress the content, if possible.
183 *
184 * The content can only be compressed when the response is using
185 * chunked Transfer-Encoding and the incoming request has `gzip`
186 * as an accepted encoding in the Accept-Encoding header.
187 *
188 * The default value is `false` (compression disabled).
Lasse Reichstein Nielsen 2014/09/23 10:39:59 You change the default to false. Is this different
Anders Johnsen 2014/09/23 11:08:04 This is transparent to the sdk change, so a minor
189 * To enable, set `autoCompress` to `true`.
190 */
191 bool autoCompress;
192
181 /** 193 /**
182 * Get or set the timeout used for idle keep-alive connections. If no further 194 * Get or set the timeout used for idle keep-alive connections. If no further
183 * request is seen within [idleTimeout] after the previous request was 195 * request is seen within [idleTimeout] after the previous request was
184 * completed, the connection is dropped. 196 * completed, the connection is dropped.
185 * 197 *
186 * Default is 120 seconds. 198 * Default is 120 seconds.
187 * 199 *
188 * Note that it may take up to `2 * idleTimeout` before a idle connection is 200 * Note that it may take up to `2 * idleTimeout` before a idle connection is
189 * aborted. 201 * aborted.
190 * 202 *
(...skipping 1786 matching lines...) Expand 10 before | Expand all | Expand 10 after
1977 class RedirectException implements HttpException { 1989 class RedirectException implements HttpException {
1978 final String message; 1990 final String message;
1979 final List<RedirectInfo> redirects; 1991 final List<RedirectInfo> redirects;
1980 1992
1981 const RedirectException(this.message, this.redirects); 1993 const RedirectException(this.message, this.redirects);
1982 1994
1983 String toString() => "RedirectException: $message"; 1995 String toString() => "RedirectException: $message";
1984 1996
1985 Uri get uri => redirects.last.location; 1997 Uri get uri => redirects.last.location;
1986 } 1998 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698