| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library utils; | 5 library utils; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 /// Adds additional query parameters to [url], overwriting the original | 9 /// Adds additional query parameters to [url], overwriting the original |
| 10 /// parameters if a name conflict occurs. | 10 /// parameters if a name conflict occurs. |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 parameters[match.group(1).toLowerCase()] = match.group(2); | 98 parameters[match.group(1).toLowerCase()] = match.group(2); |
| 99 } while (match.group(3) != null); | 99 } while (match.group(3) != null); |
| 100 | 100 |
| 101 if (!paramString.trim().isEmpty) { | 101 if (!paramString.trim().isEmpty) { |
| 102 throw new FormatException('Invalid WWW-Authenticate header: "$header"'); | 102 throw new FormatException('Invalid WWW-Authenticate header: "$header"'); |
| 103 } | 103 } |
| 104 | 104 |
| 105 return new AuthenticateHeader(scheme, parameters); | 105 return new AuthenticateHeader(scheme, parameters); |
| 106 } | 106 } |
| 107 } | 107 } |
| 108 | |
| 109 /// Returns a [Future] that asynchronously completes to `null`. | |
| 110 Future get async => new Future.delayed(const Duration(milliseconds: 0), | |
| 111 () => null); | |
| OLD | NEW |