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

Unified Diff: sdk/lib/_internal/pub/lib/src/http.dart

Issue 71023003: Add a useful user-agent string to pub HTTP requests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/http.dart
diff --git a/sdk/lib/_internal/pub/lib/src/http.dart b/sdk/lib/_internal/pub/lib/src/http.dart
index 5b13a89abd13229b2a1c69863c0ccff92611add7..017b387f4d23ff71d962dd56f161dfbbffb56574 100644
--- a/sdk/lib/_internal/pub/lib/src/http.dart
+++ b/sdk/lib/_internal/pub/lib/src/http.dart
@@ -52,6 +52,7 @@ class PubHttpClient extends http.BaseClient {
Future<http.StreamedResponse> send(http.BaseRequest request) {
_requestStopwatches[request] = new Stopwatch()..start();
+ request.headers[HttpHeaders.USER_AGENT] = "Dart pub ${sdk.version}";
_logRequest(request);
// TODO(nweiz): remove this when issue 4061 is fixed.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698