| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 import "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
| 6 import 'dart:async'; | 6 import 'dart:async'; |
| 7 import 'dart:crypto'; | 7 import 'dart:crypto'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 import 'dart:isolate'; | 9 import 'dart:isolate'; |
| 10 import 'dart:uri'; | |
| 11 import 'dart:utf'; | 10 import 'dart:utf'; |
| 12 | 11 |
| 13 class Server { | 12 class Server { |
| 14 HttpServer server; | 13 HttpServer server; |
| 15 int unauthCount = 0; // Counter of the 401 responses. | 14 int unauthCount = 0; // Counter of the 401 responses. |
| 16 int successCount = 0; // Counter of the successful responses. | 15 int successCount = 0; // Counter of the successful responses. |
| 17 int nonceCount = 0; // Counter of use of current nonce. | 16 int nonceCount = 0; // Counter of use of current nonce. |
| 18 var ha1; | 17 var ha1; |
| 19 | 18 |
| 20 static Future<Server> start(String algorithm, | 19 static Future<Server> start(String algorithm, |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 testAuthenticateCallback(null, null); | 390 testAuthenticateCallback(null, null); |
| 392 testAuthenticateCallback("MD5", null); | 391 testAuthenticateCallback("MD5", null); |
| 393 testAuthenticateCallback("MD5", "auth"); | 392 testAuthenticateCallback("MD5", "auth"); |
| 394 testAuthenticateCallback("MD5", "auth-int"); | 393 testAuthenticateCallback("MD5", "auth-int"); |
| 395 testStaleNonce(); | 394 testStaleNonce(); |
| 396 testNextNonce(); | 395 testNextNonce(); |
| 397 // These teste are not normally run. They can be used for locally | 396 // These teste are not normally run. They can be used for locally |
| 398 // testing with another web server (e.g. Apache). | 397 // testing with another web server (e.g. Apache). |
| 399 //testLocalServerDigest(); | 398 //testLocalServerDigest(); |
| 400 } | 399 } |
| OLD | NEW |