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

Unified 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, 3 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/io/http.dart
diff --git a/sdk/lib/io/http.dart b/sdk/lib/io/http.dart
index f0c4282a228cd635f03d1ffa32a6f99872271c64..d908338bc7a0ebc8776b3d93f4377b13b46f04eb 100644
--- a/sdk/lib/io/http.dart
+++ b/sdk/lib/io/http.dart
@@ -178,6 +178,18 @@ abstract class HttpServer implements Stream<HttpRequest> {
*/
HttpHeaders get defaultResponseHeaders;
+ /**
+ * Whether the [HttpServer] should compress the content, if possible.
+ *
+ * The content can only be compressed when the response is using
+ * chunked Transfer-Encoding and the incoming request has `gzip`
+ * as an accepted encoding in the Accept-Encoding header.
+ *
+ * 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
+ * To enable, set `autoCompress` to `true`.
+ */
+ bool autoCompress;
+
/**
* Get or set the timeout used for idle keep-alive connections. If no further
* request is seen within [idleTimeout] after the previous request was

Powered by Google App Engine
This is Rietveld 408576698