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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/http.dart
diff --git a/sdk/lib/io/http.dart b/sdk/lib/io/http.dart
index b995137bb259b65c2fcf5a4bae56205a2c36ad56..5a30b3fc6a09c219fc9530ab3397030db11fc421 100644
--- a/sdk/lib/io/http.dart
+++ b/sdk/lib/io/http.dart
@@ -1237,6 +1237,32 @@ abstract class HttpClient {
int maxConnectionsPerHost;
/**
+ * Get and set whether the body of a response will be automatically
+ * uncompressed.
+ *
+ * If the client want to process the body then getting the already
Anders Johnsen 2014/07/04 10:56:39 This sentence is a bit hard to read.
Søren Gjesse 2014/07/04 11:14:01 Rephrased.
+ * uncompressed is convenient. However in some situations
+ * (e.g. implementing a transparent proxy) keeping the uncompressed
+ * stream is required.
+ *
+ * NOTE: When automatic un-compression is turned on the value of the
Anders Johnsen 2014/07/04 10:56:39 Maybe state that 'No headers are modified', to be
Søren Gjesse 2014/07/04 11:14:01 Done.
+ * header `Content-Length` will reflect the length of the original
+ * compressed body. Likewise the header `Content-Encoding` will also
+ * have the original value indicating compression.
+ *
+ * NOTE: Automatic un-compression is only supported when the
Anders Johnsen 2014/07/04 10:56:39 supported -> performed/done when -> if
Søren Gjesse 2014/07/04 11:14:01 Done.
+ * `Content-Encoding` used is `gzip`.
Anders Johnsen 2014/07/04 10:56:39 used -> header
Søren Gjesse 2014/07/04 11:14:01 Done.
+ *
+ * This value affects all responses produced by this client after the
+ * value is changed.
+ *
+ * To disable, set to `false`.
+ *
+ * Default is `true`.
+ */
+ bool autoUncompress;
+
+ /**
* Set and get the default value of the `User-Agent` header for all requests
* generated by this [HttpClient]. The default value is
* `Dart/<version> (dart:io)`.
« 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