Commit Graph

103 Commits

Author SHA1 Message Date
Sean McArthur
7469e62d1e v0.3.1 2015-03-18 11:05:08 -07:00
Sean McArthur
4fd8a6a9dc fix(rustup): update to latest rustc 2015-03-16 12:01:38 -07:00
Sean McArthur
b87bb20f0c perf(http): changes http parsing to use httparse crate
httparse is a http1 stateless push parser. This not only speeds up
parsing right now with sync io, but will also be useful for when we get
async io, since it's push based instead of pull.

BREAKING CHANGE: Several public functions and types in the `http` module
  have been removed. They have been replaced with 2 methods that handle
  all of the http1 parsing.
2015-03-13 16:56:13 -07:00
Sean McArthur
003b6551cf v0.3.0 2015-03-03 21:09:45 -08:00
Sean McArthur
df756871ed feat(headers): adds re-parsing ability when getting typed headers
BREAKING CHANGE: added requirement that all HeaderFormat implementations
  must also be fmt::Debug. This likely as easy as slapping
  #[derive(Debug)] on to any custom headers.
2015-03-03 18:51:29 -08:00
Sean McArthur
b1b8bf1db7 v0.2.1 2015-02-27 06:01:44 -08:00
Sean McArthur
41fd8de243 v0.2.0 2015-02-21 15:15:09 -08:00
Sean McArthur
bdb4d0e56e v0.1.13 2015-02-17 15:31:11 -08:00
Sean McArthur
11f10ccdf2 v0.1.12 2015-02-13 12:28:43 -08:00
Sean McArthur
f836ee89c1 v0.1.11 2015-02-06 22:10:17 -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
1f5547c4b7 v0.1.10 2015-02-03 19:09:06 -08:00
Sean McArthur
c983ebf3ce chore(cargo): add keywords to Cargo.toml 2015-02-02 10:29:36 -08:00
Sean McArthur
4ad4c491d3 v0.1.9 2015-01-28 12:17:42 -08:00
Sean McArthur
bdc2ee215e v0.1.8 2015-01-27 10:05:06 -08:00
Sean McArthur
fc67a1289c v0.1.7 2015-01-23 15:41:33 -08:00
Sean McArthur
65ed029d3e v0.1.6 2015-01-21 23:22:27 -08:00
Jonathan Reem
50a23e0d5d v.0.1.5 2015-01-21 23:02:22 +01:00
Jonathan Reem
519f38c9b0 v.0.1.4 2015-01-21 20:57:58 +01:00
Jonathan Reem
bd97e659dc v.0.1.3 2015-01-21 01:23:11 +01:00
Jonathan Reem
2790f604b0 v.0.1.2 2015-01-19 20:25:23 +01:00
Sean McArthur
8f66de45cb v0.1.1 2015-01-13 12:00:54 -08:00
Sean McArthur
9fbf0aecb8 v0.1.0 2015-01-10 21:38:48 -08:00
Sean McArthur
f7124bb8e2 rustup: sweeping fixes for all the changes in 1.0-alpha
- Some switches to u64 instead of usize
- For now, allow(unstable)
- use associated types for all the Network stuff
2015-01-10 21:29:27 -08:00
cyderize
d9c657da73 Make status::StatusCode_0 pass
Needed to allow unstable.

Also, why do we depend on typeable? Removed from Cargo.toml
2015-01-10 19:36:51 +11:00
Sean McArthur
92b836dc03 v0.0.21 2015-01-05 19:27:44 -08:00
Sean McArthur
fc04086406 v0.0.20 2015-01-02 13:27:22 -08:00
Sean McArthur
cef16431aa v0.0.19 2014-12-30 18:03:44 -08:00
Sean McArthur
719418b7d8 v0.0.18 2014-12-29 17:43:41 -08:00
Sean McArthur
139d9bd76c v0.0.17 2014-12-23 16:41:15 -08:00
Sean McArthur
691c70a380 update str::from_utf8 2014-12-23 12:55:53 -08:00
Sean McArthur
33f61213ce v0.0.16 2014-12-21 20:32:57 -08:00
Sean McArthur
b7aa384ce4 v0.0.15 2014-12-21 11:10:37 -08:00
Jonathan Reem
5683e016c7 (release) 0.0.14. 2014-12-20 03:07:56 -08:00
Jonathan Reem
618f95e10a (fix) Update examples and benchmarks to remove rust-http. 2014-12-20 03:07:05 -08:00
Jonathan Reem
15bac9dadc (release) 0.0.13. 2014-12-16 04:02:57 -08:00
Jonathan Reem
39c548dc39 feat(cargo): prepare for crates.io release. 2014-12-16 04:02:13 -08:00
Sean McArthur
d71d6549f7 refactor(headers): changed from rwlock to mucell underneath 2014-11-29 22:06:48 -08:00
Chris Morgan
8e2255430c Drop the unnecessary dependency on typeable.
See also https://github.com/reem/rust-typeable/issues/3.
2014-11-22 17:20:44 +11:00
Sean McArthur
3cd9b10bcb feat(server): keep-alive!
Internals have been shuffled around such that Request and Reponse are
now given only a mutable reference to the stream, instead of being
allowed to consume it. This allows the server to re-use the streams if
keep-alive is true.

A task pool is used, and the number of the threads can currently be
adjusted by using the `listen_threads()` method on Server.

[breaking-change]
2014-11-20 21:40:55 -08:00
Jakob Gillich
7de67e62f3 fix(time): The time crate has moved to out-of-tree.
This adds a dependency on the time crate found in rust-lang/time
and fixes a field rename from tm_gmtoff to tm_utcoff.

add time dependency

tm_gmtoff has been renamed to tm_utcoff
2014-11-13 13:47:20 -08:00
Jonathan Reem
928f63c368 Removes intertwining, since it is slow and showing up in profiles
Intertwining was a nice feature, but it slows down hyper significantly,
so it is being removed.

There is some fallout from this, mainly that Incoming has had its type
parameter changed to `<A = HttpAcceptor>` and Handler receiving one
bounded with `A: NetworkAcceptor`.

[breaking-change]

Fixes #112
2014-11-10 17:26:55 -08:00
Sean McArthur
5c224289ec adjustments to Cookie and SetCookie 2014-11-10 12:32:11 -08:00
Stanislav Panferov
a3fc51611f Add cookie_rs as default feature and implement conditional compilation. 2014-11-10 12:31:33 -08:00
Stanislav Panferov
0a624b10e0 Add cookie-rs and use cookie::Cookie in Cookie header. 2014-11-10 12:31:33 -08:00
Sean McArthur
68e2278339 update mime.rs dependency url 2014-10-24 09:55:44 -07:00
Sean McArthur
d603895d7b Merge pull request #38 from reem/persistent-headers
Refactor Header representation to not store the raw representation
2014-09-16 19:05:54 -07:00
Sean McArthur
42e69e1f2e ssl for the client 2014-09-15 21:12:19 -07:00
Jonathan Reem
2ca119fd80 Added Typeable dependency. 2014-09-15 19:21:17 -07:00
Jonathan Reem
c2d9e34376 Change Server to contain a Vec of (ip, port) pairs to allow repeat listening
Expose Server::many for creating a Server that will listen on many (ip, port)
pairs.

Handler still receives a simple Iterator of (Request, Response) pairs.

This is a breaking change since it changes the representation of Listener,
but Handler and Server::http are unchanged in their API.

Fixes #7
2014-09-10 11:55:46 -07:00