Fix cert errors on allowHttp1 test
This commit is contained in:
parent
564310baca
commit
bcfaf04dda
1 changed files with 5 additions and 2 deletions
|
@ -6,7 +6,7 @@ import 'package:angel_framework/angel_framework.dart' hide Header;
|
||||||
import 'package:angel_framework/http2.dart';
|
import 'package:angel_framework/http2.dart';
|
||||||
import 'package:http/src/multipart_file.dart' as http;
|
import 'package:http/src/multipart_file.dart' as http;
|
||||||
import 'package:http/src/multipart_request.dart' as http;
|
import 'package:http/src/multipart_request.dart' as http;
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/io_client.dart';
|
||||||
import 'package:http2/transport.dart';
|
import 'package:http2/transport.dart';
|
||||||
import 'package:http_parser/http_parser.dart';
|
import 'package:http_parser/http_parser.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
|
@ -22,7 +22,7 @@ Stream<List<int>> jfkStream() {
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
var client = Http2Client();
|
var client = Http2Client();
|
||||||
var h1c = http.Client();
|
IOClient h1c;
|
||||||
Angel app;
|
Angel app;
|
||||||
AngelHttp2 http2;
|
AngelHttp2 http2;
|
||||||
Uri serverRoot;
|
Uri serverRoot;
|
||||||
|
@ -98,6 +98,9 @@ void main() {
|
||||||
..usePrivateKey('dev.key', password: 'dartdart')
|
..usePrivateKey('dev.key', password: 'dartdart')
|
||||||
..setAlpnProtocols(['h2'], true);
|
..setAlpnProtocols(['h2'], true);
|
||||||
|
|
||||||
|
// Create an HTTP client that trusts our server.
|
||||||
|
h1c = IOClient(HttpClient()..badCertificateCallback = (_, __, ___) => true);
|
||||||
|
|
||||||
http2 = AngelHttp2(app, ctx, allowHttp1: true);
|
http2 = AngelHttp2(app, ctx, allowHttp1: true);
|
||||||
|
|
||||||
var server = await http2.startServer();
|
var server = await http2.startServer();
|
||||||
|
|
Loading…
Reference in a new issue