Sean McArthur
93ac2c8e46
Merge pull request #289 from hyperium/opt-cell
...
refactor(headers): switch from MuCell to OptCell
2015-02-06 21:53:38 -08:00
Sean McArthur
d7fe8c307a
refactor(headers): switch from MuCell to OptCell
...
It turns out, we don't need capabilities of MuCell (or even RefCell).
We don't to have sophisticated interior mutability. We don't ever lend
out references that may be mutated later. Instead, if there is no value
to lend, then we generate the value, require interior mutability to save
the value internally, and then we return a reference. We never ever
change a value once it's been generated. It can be changed, but only via
&mut self methods, where we can safely reason about mutability.
This means we don't need keep borrow checking code at runtime, which
helps performance. We also are able to reduce the amount of unsafe
transmutes. The internal API more safely constrains the usage of unsafe,
enforcing our invariants, instead of shotgunning unsafe usage with Refs
and promising we're doing it correctly.
On a machine with lower memory (1GB):
Before:
test bench_mock_hyper ... bench: 251772 ns/iter (+/- 128445)
After:
test bench_mock_hyper ... bench: 152603 ns/iter (+/- 25928)
On a machine with more memory, weaker CPU:
Before:
test bench_mock_hyper ... bench: 129398 ns/iter (+/- 51740)
After:
test bench_mock_hyper ... bench: 115935 ns/iter (+/- 28555)
Closes #252
2015-02-06 21:47:29 -08:00
Sean McArthur
e9af13c3a6
Merge pull request #297 from hugoduncan/feature/add-if-unmodified-since
...
feat(headers): add IfUnmodifiedSince header
2015-02-06 16:30:42 -08:00
Hugo Duncan
b5543b6752
feat(headers): add IfUnmodifiedSince header
...
This adds support for the If-Unmodified-Since header, and is a trivially
edited version of IfModifiedSince.
2015-02-06 18:42:52 -05:00
Sean McArthur
04e865c1cf
Merge pull request #294 from xymostech/patch-2
...
fix(readme): Make the README client example work
2015-02-06 10:17:18 -08:00
Emily Eisenberg
9b5d6aab7e
fix(readme): Make the README client example work
...
`res` needs to be unwrapped, we want to print out `body`, and `res` doesn't need to be mutable.
2015-02-06 10:09:23 -08:00
Sean McArthur
c2784bca7a
docs(git): push contributors list to humans.txt
2015-02-05 20:01:19 -08:00
Sean McArthur
1f5547c4b7
v0.1.10
2015-02-03 19:09:06 -08:00
Sean McArthur
22a80a9308
Merge pull request #292 from hyperium/rustup
...
fix(rustup): update FromStr
2015-02-03 19:01:32 -08:00
Peter Atashian
742081c8cf
fix(rustup): update FromStr
...
Signed-off-by: Peter Atashian <retep998@gmail.com >
2015-02-03 18:57:24 -08:00
Sean McArthur
eee4625686
Merge pull request #290 from hyperium/max-headers
...
fix(headers): add limit to maximum headers that should be parsed
2015-02-03 18:37:22 -08:00
Sean McArthur
f18a8fb76f
fix(headers): add limit to maximum header size that should be parsed
...
Closes #256
2015-02-03 11:06:17 -08:00
Sean McArthur
c983ebf3ce
chore(cargo): add keywords to Cargo.toml
2015-02-02 10:29:36 -08:00
Sean McArthur
05a3a6b70b
fix(rustup): fix unused_feature warning in example server
2015-02-01 20:39:09 -08:00
Sean McArthur
3bf4c5e7ae
Merge pull request #288 from hyperium/rustup
...
fix(rustup): switch to unstable features
2015-01-31 12:27:40 -08:00
Sean McArthur
3af8b687d4
fix(rustup): switch to unstable features
2015-01-31 12:15:44 -08:00
Sean McArthur
4ad4c491d3
v0.1.9
2015-01-28 12:17:42 -08:00
Sean McArthur
fcefda091f
Merge pull request #287 from hyperium/rustup
...
fix(rustup): update io import, Writer::write
2015-01-28 12:10:05 -08:00
Christian Stefanescu
f606b6039d
fix(rustup): update io import, Writer::write
...
Make it build with the latest rust-nightly (2015-01-27)
Renamed io import to old_io.
Renamed Writer::write to Writer::write_all
2015-01-28 11:58:45 -08:00
Sean McArthur
537d691d61
Merge pull request #283 from reem/dont-print-q=1
...
fix(headers): Don't display q if q=1 in quality item.
2015-01-27 23:07:18 -08:00
Jonathan Reem
91df2441a0
fix(headers): Don't display q if q=1 in quality item.
...
Fixes #281
2015-01-28 00:54:38 -05:00
Sean McArthur
93821fc731
chore(git): update changelog.md
2015-01-27 18:30:33 -08:00
Jonathan Reem
9a23721c43
Merge pull request #282 from hyperium/is-status-class
...
feat(status): add is_<status_class>() methods to StatusCodes
2015-01-27 21:21:48 -05:00
Sean McArthur
2d55a22e73
feat(status): add is_<status_class>() methods to StatusCodes
2015-01-27 18:07:23 -08:00
Sean McArthur
bdc2ee215e
v0.1.8
2015-01-27 10:05:06 -08:00
Sean McArthur
8ebc335b20
Merge pull request #280 from hyperium/rustup
...
Rustup
2015-01-27 09:27:05 -08:00
Sean McArthur
b002b6c3f0
fix(log): update to new logging levels
2015-01-27 09:08:01 -08:00
Jonathan Reem
1ebbdedd13
chore(warnings): Allow direct recursion for type enforcement.
2015-01-27 09:08:01 -08:00
Jonathan Reem
0a92e0d671
Merge pull request #276 from Ryman/handle_lifetime
...
refactor(server): Add explicit lifetime annotations for Handler trait
2015-01-26 20:55:26 -05:00
Kevin Butler
c592b71d64
refactor(server): Add explicit lifetime annotations for Handler trait
2015-01-27 00:23:24 +00:00
Sean McArthur
e5417b834b
Merge pull request #271 from pyfisch/cookie
...
refactor(headers): Rename `Cookies` header to `Cookie`
2015-01-26 10:35:34 -08:00
Sean McArthur
0fbbb3ca58
Merge pull request #273 from pyfisch/patch-1
...
chore(git): clarify CONTRIBUTING.md
2015-01-26 10:34:32 -08:00
Pyfisch
2c7b4fb449
chore(git): clarify CONTRIBUTING.md
...
It turned out in #271 that the current description for commit messages
introducing breaking changes is not clear enough.
2015-01-26 17:14:05 +01:00
Pyfisch
92f43cf873
refactor(headers): Rename Cookies header to Cookie
...
`Cookie` is the actual name of the header and since all other header structs
use the exact camel-cased version of their name using a different name here
is very inconvienient and confusing. You will encounter weird errors if you
try to use `Cookie` as the header. For this reason rename `Cookies` as
discussed on IRC with @seanmonstar and @reem and use `CookiePair` for real
cookies.
BREAKING CHANGE: Change header `Cookie` to `Cookie`
2015-01-26 17:10:36 +01:00
Jonathan Reem
e23e2feeee
Merge pull request #267 from pyfisch/pragma
...
feat(headers): Add `Pragma` header field
2015-01-24 20:04:32 +01:00
Pyfisch
767c95d2b9
feat(headers): Add Pragma header field
...
Add the HTTP/1.0 `Pragma` header field used to prevent older Caches, that
do not understand the `Cache-Control` header field from caching the ressource.
Closes #237
2015-01-24 15:09:59 +01:00
Sean McArthur
fb92a260c0
Merge pull request #270 from cyderize/case-insensitive
...
fix(headers): make ConnectionHeader and search for websocket protocol unicase
2015-01-23 21:34:33 -08:00
Jason N
e06e7d9a7e
fix(headers): make ConnectionHeader unicase
...
Make ConnectionHeader case-insensitive since HTTP headers are
case-insensitive
2015-01-24 16:09:20 +11:00
Jason N
65c7018046
fix(headers): make Protocol search websocket unicase
...
RFC6455 requires the Upgrade Protocol to search case-insensitively for
"websocket"
Other protocol values may be case-sensitive, however, so ProtocolExt is
still case-sensitive
2015-01-24 16:08:09 +11:00
Sean McArthur
fc67a1289c
v0.1.7
2015-01-23 15:41:33 -08:00
Sean McArthur
6c9ed80936
Merge pull request #269 from hyperium/rustup
...
fix(rustup): update to newest fmt trait names and slice syntax
2015-01-23 15:38:08 -08:00
Sean McArthur
9e3c94d764
fix(rustup): update to newest fmt trait names and slice syntax
2015-01-23 14:17:19 -08:00
Sean McArthur
bb4f913ede
Merge pull request #268 from hyperium/ufcs
...
refactor(headers): remove marker from header_name method
2015-01-22 16:43:27 -08:00
Sean McArthur
8215889eda
refactor(headers): remove marker from header_name method
...
It is no longer required, as we can use `<H as Header>::header_name()`.
BREAKING CHANGE: Implementations of Header will need to adjust the
header_name method. It no longer takes any arguments.
2015-01-22 15:20:38 -08:00
Sean McArthur
65ed029d3e
v0.1.6
2015-01-21 23:22:27 -08:00
Sean McArthur
45069a972e
Merge pull request #265 from cyderize/make-public
...
fix(headers): make Schemes, Basic, Protocol public
2015-01-21 23:10:22 -08:00
Jason N
e43c35c1ca
fix(headers): make Schemes, Basic, Protocol public
...
Expose Authorization header Scheme trait and Basic authorization
Expose the Upgrade header Protocol
2015-01-22 14:26:51 +11:00
Jonathan Reem
50a23e0d5d
v.0.1.5
2015-01-21 23:02:22 +01:00
Jonathan Reem
b3a5caddc9
Merge pull request #264 from ProtectedMode/master
...
Make CacheDirective public
2015-01-21 23:01:25 +01:00
ProtectedMode
115f56adf9
refactor(headers): make CacheDirective public
2015-01-21 21:43:38 +00:00