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