On OSX, calling shutdown a second time will return a NotConnected error.
This commit will just ignore it, since we can agree that if a stream is
"not connected", it is in fact "closed".
Closes#508
The errors from openssl were previously boxed into a
Box<std::error::Error>, which lost some specifics and made it difficult
to match against. To solve this, an `Ssl` variant is added to the
`Error` enum of hyper, and is returned when openssl returns specific
errors.
Closes#483
BREAKING CHANGE: Adds a variant to `hyper::Error`, which may break any
exhaustive matches.
The old names followed the old style of including the module name and
"Error" in each variant. The new style is to refer to an error from its
owning module, and variants are now scoped to their enum, so there's no
need to include the enum name in the variant name.
BREAKING CHANGE: The terms `Http` and `Error` have been removed from the Error
type and its variants. `HttpError` should now be accessed as `hyper::Error`,
and variants like `HttpIoError` should be accessed as `Error::Io`.
The spec says the header can be either a `*`, `null` or an URL.
Improve docs of header.
BREAKING CHANGE: Add variant to Access-Control-Allow-Origin enum
Parses protocols into a name and a value part matching the RFC.
An enum contains all registered or known protocols, but contains
an extension variant.
Closes#480
BREAKING CHANGE: Upgrade header Protocol changed.
A single value header value can't be "", so `from_one_raw_str()` now
returns `None` on empty values. This makes custom checks in headers
obsolete.
BREAKING CHANGE: `from_one_raw_str()` returns `None` on empty values.
Generates a test coverage using kcov on travis. The coverage is only
generated for beta builds. kcov requires using sudo, so beta builds
can't run on container infrastructure anymore.
Closes#44
That way, third-parties can keep using the `header!` macro, which
now requires the `test_header!` macro as well.
Considering the `header!` macro is exported and part of the public
API, it was not desired to prevent it's usage in any way.
This adds a connection pool to the Client that is used by default. It
accepts any other NetworkConnector, and simply acts as a
NetworkConnector itself. Other Pools can exist by simply providing a
custom NetworkConnector. This Pool is only used by default if you also
use the default connector, which is `HttpConnector`. If you wish to use
the Pool with a custom connector, you'll need to create the Pool with
your custom connector, and then pass that pool to the
Client::with_connector.
This also adds a method to `NetworkStream`, `close`, which can be used
to know when the Stream should be put down, because a server requested
that the connection close instead of be kept alive.
Closes#363Closes#41