I couldn't figure out why my "username:password" strings kept failing to parse
into a Basic auth header, until I realized that the implementation expects
it to be base-64 encoded, which would be the case if it was coming from HTTP.
I'm not sure if this is the best place to document it, but hopefully it will
make it more clear for other people / me when I forget.
Perhaps a better approach would be to document somewhere that all `FromStr` impls for
headers are there for parsing request headers, and not really for creating them.
If a request sees an error on a pooled connection before ever writing
any bytes, it will now retry with a new connection.
This can be configured with `Config::retry_canceled_requests(bool)`.
Currently, if the remote closes the connection at the same time that the
pool selects it to use for a new request, the connection may actually
hang. This fix will now more allow the keep-alive read to check the
socket even when the `Conn` think it's busy.
If the connection was closed before the request write happened, returns
back an `Error::Cancel`, letting the user know they could safely retry
it.
Closes#1439
Setting this to false will force HTTP/1 connections to always flatten
all buffers (headers and body) before writing to the transport. The
default is true.
The 1.0 milestone has currently no issues but the 0.12 milestone has. So instead of adjusting the README.md for each next mileston, just link to all milestones
Returning a Response from a Service with a 1xx StatusCode is not
currently supported in hyper. It has always resulted in broken
semantics. This patch simply errors better.
- A Response with 1xx status is converted into a 500 response with no body.
- An error is returned from the `server::Connection` to alert about the
bad response.
- Downgrades internal semantics to HTTP/1.0 if peer sends a message with
1.0 version.
- If downgraded, chunked writers become EOF writers, with the connection
closing once the writing is complete.
- When downgraded, if keep-alive was wanted, the `Connection: keep-alive`
header is added.
Closes#1304
This allows using a future `Executor` other than a `Handle` to execute
the background (connection) tasks needed for sending requests and
responses.
This also deprecates `Client::handle()`, since the executor may not be
a `Handle`.