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

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: 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..ea6527d9a7a403f8e4ff3c1ccf8108c51c6998f0 100644
--- a/sdk/lib/io/http.dart
+++ b/sdk/lib/io/http.dart
@@ -171,6 +171,14 @@ abstract class HttpServer implements Stream<HttpRequest> {
* current connections handled by the server.
*/
HttpConnectionsInfo connectionsInfo();
+
+ /**
+ * Set and get the version of the [:HttpServer:]. The string will be set as
Søren Gjesse 2013/06/11 11:02:00 Change Set and get the version of the [:HttpSer
Anders Johnsen 2013/06/11 11:37:55 Done.
+ * the [:Server:] header field for all [HttpResponse]s.
Søren Gjesse 2013/06/11 11:02:00 You can use ` ` instead of [: :].
Anders Johnsen 2013/06/11 11:37:55 Done.
+ *
+ * If the version is set to [:null:]. the field won't be set.
Søren Gjesse 2013/06/11 11:02:00 the field won't be set -> no default `Server` head
Anders Johnsen 2013/06/11 11:37:55 Done.
+ */
+ String version;
Søren Gjesse 2013/06/11 11:02:00 This should be called serverHeader (or maybe even
Anders Johnsen 2013/06/11 11:37:55 Done.
}
@@ -879,6 +887,14 @@ abstract class HttpClient {
*/
Duration idleTimeout;
+ /**
+ * Set and get the user agent of the [:HttpClient:]. The string will be set as
+ * the [:User-Agent:] header field for all [HttpClientRequest]s.
+ *
+ * If the version is set to [:null:]. the field won't be set.
+ */
+ String userAgent;
+
factory HttpClient() => new _HttpClient();
/**
« no previous file with comments | « runtime/bin/io_natives.cc ('k') | sdk/lib/io/http_impl.dart » ('j') | sdk/lib/io/options.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698