Commit Graph

5 Commits

Author SHA1 Message Date
Sean McArthur
316c6fad30 refactor(header): change HttpDate to opaque over SystemTime
This removes the need for someone to use the `time` crate to create a
date compatible with HTTP headers. It now works with the `SystemTime`
type from the standard library.

BREAKING CHANGE: `HttpDate` no longer has public fields. Convert between
  `HttpDate` and `SystemTime` as needed.
2017-04-25 14:30:49 -07:00
Sean McArthur
6f02d43ae0 refactor(header): change Header::fmt_header to take a header::Formatter
The `header::Formatter` ensures that a formatted header is written to a
line, and allows for headers that require multiple lines. The only
header to specifically require this is `Set-Cookie`.

BREAKING CHANGE: The `fmt_header` method has changed to take a different
  formatter. In most cases, if your header also implements
  `fmt::Display`, you can just call `f.fmt_line(self)`.
2017-04-24 10:56:05 -07:00
Sean McArthur
61364d245b perf(header): improve on MemSlice usage in headers 2017-01-26 23:49:44 -08:00
Guillaume Gomez
1b556389c0 perf(header): use MemSlice when parsing headers 2017-01-26 10:07:34 -08:00
Julius de Bruijn
1037bc7732 feat(header): Add support for Retry-After header
This used to be an external crate, https://github.com/jwilm/retry-after
2017-01-19 15:29:05 -08:00