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

Unified Diff: sdk/lib/io/http_impl.dart

Issue 12378040: Add missing certificate getter on HttpClientResponse and add a regression test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix long line. Created 7 years, 10 months 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 | « sdk/lib/io/http.dart ('k') | tests/standalone/io/https_client_certificate_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/http_impl.dart
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart
index 4f65b855d04ecb9cd8cb3d10a5d41f9d11b034f7..ae575f385b137bc39eeb09efbb04bfaf9de439a6 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -4,8 +4,7 @@
part of dart.io;
-class _HttpIncoming
- extends Stream<List<int>> implements StreamSink<List<int>> {
+class _HttpIncoming extends Stream<List<int>> {
final int _transferLength;
final Completer _dataCompleter = new Completer();
Stream<List<int>> _stream;
@@ -54,7 +53,7 @@ class _HttpIncoming
}
}
-class _HttpInboundMessage extends Stream<List<int>> {
+abstract class _HttpInboundMessage extends Stream<List<int>> {
final _HttpIncoming _incoming;
List<Cookie> _cookies;
@@ -65,7 +64,7 @@ class _HttpInboundMessage extends Stream<List<int>> {
return _cookies = headers._parseCookies();
}
- HttpHeaders get headers => _incoming.headers;
+ _HttpHeaders get headers => _incoming.headers;
String get protocolVersion => headers.protocolVersion;
int get contentLength => headers.contentLength;
bool get persistentConnection => headers.persistentConnection;
@@ -82,7 +81,7 @@ class _HttpRequest extends _HttpInboundMessage implements HttpRequest {
final _HttpConnection _httpConnection;
- HttpSession _session;
+ _HttpSession _session;
_HttpRequest(_HttpResponse this.response,
_HttpIncoming _incoming,
@@ -167,6 +166,11 @@ class _HttpClientResponse
int get statusCode => _incoming.statusCode;
String get reasonPhrase => _incoming.reasonPhrase;
+ X509Certificate get certificate {
+ var socket = _httpRequest._httpClientConnection._socket;
+ return socket.peerCertificate;
+ }
+
List<Cookie> get cookies {
if (_cookies != null) return _cookies;
_cookies = new List<Cookie>();
« no previous file with comments | « sdk/lib/io/http.dart ('k') | tests/standalone/io/https_client_certificate_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698