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

Unified Diff: utils/pub/http.dart

Issue 12667016: Use default-port-aware URI comparisons in pub. (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/http.dart
diff --git a/utils/pub/http.dart b/utils/pub/http.dart
index a12c2d0fc3e79b502176613112406c631d39eb62..b66f28d749f72b2fa79851f0ac700094b2dc429a 100644
--- a/utils/pub/http.dart
+++ b/utils/pub/http.dart
@@ -52,7 +52,8 @@ class PubHttpClient extends http.BaseClient {
// 401 responses should be handled by the OAuth2 client. It's very
// unlikely that they'll be returned by non-OAuth2 requests. We also want
// to pass along 400 responses from the token endpoint.
- var tokenRequest = streamedResponse.request.url == oauth2.tokenEndpoint;
+ var tokenRequest = urisEqual(
+ streamedResponse.request.url, oauth2.tokenEndpoint);
if (status < 400 || status == 401 || (status == 400 && tokenRequest)) {
return streamedResponse;
}

Powered by Google App Engine
This is Rietveld 408576698