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

Unified Diff: pkg/mdns/lib/src/lookup_resolver.dart

Issue 1403303012: Re-land "Extend the mDNS package with a native extension used on Mac OS" (Closed) Base URL: git@github.com:dart-lang/fletch.git@master
Patch Set: Added mussing scripts Created 5 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 | « pkg/mdns/lib/src/constants.dart ('k') | pkg/mdns/lib/src/native_extension_api.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/mdns/lib/src/lookup_resolver.dart
diff --git a/pkg/mdns/lib/src/lookup_resolver.dart b/pkg/mdns/lib/src/lookup_resolver.dart
index 048069f1067800c6f203bc1f1e90b38f9f09022c..0667a16a4c80ebb9367b9596e0f4736c878b3cdb 100644
--- a/pkg/mdns/lib/src/lookup_resolver.dart
+++ b/pkg/mdns/lib/src/lookup_resolver.dart
@@ -1,6 +1,6 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
+// BSD-style license that can be found in the LICENSE.md file.
library mdns.src.lookup_resolver;
@@ -34,13 +34,16 @@ class LookupResolver {
void handleResponse(List<DecodeResult> response) {
for (var r in response) {
+ var name = r.name.toLowerCase();
+ if (name.endsWith('.')) name = name.substring(0, name.length - 1);
pendingRequests
- .where((pendingRequest) => pendingRequest.hostname == r.name)
+ .where((pendingRequest) {
+ return pendingRequest.hostname.toLowerCase() == name;
+ })
.forEach((pendingRequest) {
pendingRequest.completer.complete(r.address);
pendingRequest.unlink();
- });
- }
+ });
+ }
}
}
-
« no previous file with comments | « pkg/mdns/lib/src/constants.dart ('k') | pkg/mdns/lib/src/native_extension_api.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698