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

Unified Diff: sdk/lib/io/http.dart

Issue 16758008: Add 'Server' and 'User-Agent' default header fields. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: git cl dcommit Created 7 years, 6 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 | « sdk/lib/_internal/compiler/implementation/lib/io_patch.dart ('k') | 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 4ea77f72d75e5591bcb105d792c70036babb3d83..63dc3ac998981865d2ffa6667f30b92a5a47fa34 100644
--- a/sdk/lib/io/http.dart
+++ b/sdk/lib/io/http.dart
@@ -171,6 +171,16 @@ abstract class HttpServer implements Stream<HttpRequest> {
* current connections handled by the server.
*/
HttpConnectionsInfo connectionsInfo();
+
+ /**
+ * Set and get the default value of the `Server` header for all responses
+ * generated by this [HttpServer]. The default value is
+ * `Dart/<version> (dart:io)`.
+ *
+ * If the serverHeader is set to `null`, no default `Server` header will be
+ * added to each response.
+ */
+ String serverHeader;
}
@@ -879,6 +889,16 @@ abstract class HttpClient {
*/
Duration idleTimeout;
+ /**
+ * 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)`.
+ *
+ * If the userAgent is set to `null`, no default `User-Agent` header will be
+ * added to each request.
+ */
+ String userAgent;
+
factory HttpClient() => new _HttpClient();
/**
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/lib/io_patch.dart ('k') | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698