Skip to content

Http package does not expose HttpClient capabilities but keeps the backing instance private at the same time #18871

@DartBot

Description

@DartBot

This issue was originally filed by [email protected]


What steps will reproduce the problem?

  1. Import the built in package with: import 'package:http/http.dart';
  2. Try to issue a request against a host which has SSL problems, in my case SEC_ERROR_UNKNOWN_ISSUER ( see https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/SSL_functions/sslerr.html )
  3. Watch it fail with a handshake problem

What is the expected output? What do you see instead?

I'd expect the http package to expose the setter for the backing HttpClient badCertificateCallback somehow.

To solve my use-case the easiest would be to publicise the currently private variable ( called _inner in io_client.dart ) but I can see how some people would oppose that.

What version of the product are you using? On what operating system?
Dart Stable 1.3.6, it's the same in 1.4.0-edge.36282
OS X Mavericks 10.9.2

Please provide any additional information below.

Metadata

Metadata

Assignees

Labels

area-pkgUsed for miscellaneous pkg/ packages not associated with specific area- teams.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions