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

Unified Diff: utils/pub/oauth2.dart

Issue 12633015: Add a SafeHttpServer shim to work around issue 9140. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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: utils/pub/oauth2.dart
diff --git a/utils/pub/oauth2.dart b/utils/pub/oauth2.dart
index 6543ecd06528cbf626ccba93d131b090d1e78bc9..55245f3431c8d99c0b4f809168a4a4ad9e777ece 100644
--- a/utils/pub/oauth2.dart
+++ b/utils/pub/oauth2.dart
@@ -15,6 +15,7 @@ import '../../pkg/pathos/lib/path.dart' as path;
import 'http.dart';
import 'io.dart';
import 'log.dart' as log;
+import 'safe_http_server.dart';
import 'system_cache.dart';
import 'utils.dart';
@@ -171,7 +172,7 @@ Future<Client> _authorize() {
// Spin up a one-shot HTTP server to receive the authorization code from the
// Google OAuth2 server via redirect. This server will close itself as soon as
// the code is received.
- return HttpServer.bind('127.0.0.1', 0).then((server) {
+ return SafeHttpServer.bind('127.0.0.1', 0).then((server) {
var authUrl = grant.getAuthorizationUrl(
Uri.parse('http://localhost:${server.port}'), scopes: _scopes);

Powered by Google App Engine
This is Rietveld 408576698