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

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: Clean up comments and field name. 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
Index: sdk/lib/io/http.dart
diff --git a/sdk/lib/io/http.dart b/sdk/lib/io/http.dart
index 4ea77f72d75e5591bcb105d792c70036babb3d83..4a4e6867d8f2d9036f2aefe1c2bafa2691d66ed7 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 version is set to `null`, no default `Server` header will be added
Søren Gjesse 2013/06/11 11:48:37 the version -> [serverHeader].
Anders Johnsen 2013/06/11 11:54:09 Done.
+ * 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 version is set to `null`, no default `User-Agent` header will be
Søren Gjesse 2013/06/11 11:48:37 the version -> [userAgent].
Anders Johnsen 2013/06/11 11:54:09 Done.
+ * added to each request.
+ */
+ String userAgent;
+
factory HttpClient() => new _HttpClient();
/**

Powered by Google App Engine
This is Rietveld 408576698