Commit Graph

2510 Commits

Author SHA1 Message Date
Jonathan Reem
eaee849972 refactor(response): made deconstruct available on all response types. 2014-11-19 16:27:41 -08:00
Jonathan Reem
ce5acd1553 fix(readme): make the server example compile. 2014-11-19 15:33:31 -08:00
Sean McArthur
52ede44a2a Merge pull request #128 from reem/find-equiv
Rust update
2014-11-19 15:28:43 -08:00
Jonathan Reem
7f2a01fca3 (fix) Fix benchmarks for rust API changes. 2014-11-19 15:13:30 -08:00
Jonathan Reem
dbfcd1ecfc (fix) Replace find_equiv with a lifetime transmute. 2014-11-19 14:52:49 -08:00
Jonathan Reem
5e92d826d4 Merge pull request #127 from jgillich/enum
namespaced enums
2014-11-19 14:45:20 -08:00
Jakob Gillich
f3e1baea9f fix(http): is_valid_method expects &-ptr 2014-11-19 22:07:11 +01:00
Jakob Gillich
35b7ec132e refactor(status): replace glob with namespaced variants 2014-11-19 22:07:04 +01:00
Kyle Dewey
d7e8b8b117 Now using use along with enums, as per https://github.com/rust-lang/rust/pull/18973. 2014-11-19 22:03:41 +01:00
Sean McArthur
7e55506134 move other header parse utils to util module 2014-11-19 10:08:07 -08:00
Jonathan Reem
f12f5fc584 Merge pull request #124 from austinpray/patch-1
spelling error in readme
2014-11-18 19:09:05 -08:00
Austin Pray
69a346c491 spelling error in readme 2014-11-18 21:06:39 -06:00
Sean McArthur
14d3209a72 make Headers implement Clone 2014-11-17 11:19:07 -08:00
Sean McArthur
35336c770e Merge pull request #122 from jgillich/str
from_str & TaskPool updates
2014-11-17 11:16:47 -08:00
Jakob Gillich
0020ad1e97 TaskPool updates 2014-11-17 20:10:16 +01:00
Jakob Gillich
125e1f7d63 std::from_str has been moved to std::str 2014-11-17 20:09:53 +01:00
Jonathan Reem
11b32da5c4 Merge pull request #121 from jkleint/patch-1
Fix client example so it compiles
2014-11-16 00:31:57 -08:00
jkleint
079357a8c6 Fix client example so it compiles
`URL::parse()` needs an `unwrap()`, the `let res = ...` needs a semicolon, and I changed the example to set a real header.
2014-11-15 17:01:48 -05:00
Jonathan Reem
6206afe7fe Merge branch 'jgillich-time' 2014-11-13 13:48:35 -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
374da358ef Merge pull request #115 from tikue/master
impl Error and FromError for HttpError; replace instances of try_io! with try!
2014-11-11 01:04:31 -08:00
Tim Kuehn
5605ade5dc impl Error and FromError for HttpError; replace instances of try_io! with try! 2014-11-10 22:59:18 -08:00
Sean McArthur
b9bfdd0537 style changes 2014-11-10 20:53:37 -08:00
Sean McArthur
db24256914 update server benchmarks 2014-11-10 17:56:06 -08:00
Sean McArthur
23d376ed6f Merge pull request #113 from reem/remove-intertwining
Removes intertwining, since it is slow and showing up in profiles
2014-11-10 17:53:49 -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
d5982378d1 Merge pull request #111 from reem/header-benchmarks
Add benchmarks for all implemented headers except set-cookie.
2014-11-10 16:44:42 -08:00
Jonathan Reem
d4312c8fe8 Add benchmarks for all implemented headers except set-cookie. 2014-11-10 16:32:30 -08:00
Jonathan Reem
18f5e89432 Add bench_header for benchmarking header implementations. 2014-11-10 16:32:09 -08:00
Sean McArthur
d51657a831 log fixes 2014-11-10 16:28:56 -08:00
Sean McArthur
03fb215326 update benchmarks 2014-11-10 16:11:02 -08:00
Sean McArthur
bb45ac509d some more logging 2014-11-10 16:10:52 -08:00
Sean McArthur
358edc0d2b fix Get and Head requests that weren't writing headers 2014-11-10 16:10:37 -08:00
Sean McArthur
619c896801 Merge pull request #110 from hyperium/server-parsing
feat(server): change Incoming to iterator over Connections
2014-11-10 14:26:44 -08:00
Sean McArthur
3c10a8a191 feat(server): change Incoming to iterator over Connections
A connection is returned from Incoming.next(), and can be passed to a
separate thread before any parsing happens. Call conn.open() to get a
Result<(Request, Response)>.

BREAKING CHANGE
2014-11-10 13:55:11 -08:00
Sean McArthur
0500b5f17f Merge pull request #106 from hyperium/cookies
Cookies
2014-11-10 12:45:15 -08:00
Sean McArthur
fcfb0505dd update to newest cookie-rs 2014-11-10 12:33:29 -08:00
Sean McArthur
33210641f7 use Vec::with_capacity(raw.len()) for Cookies 2014-11-10 12:32:11 -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
20f156c592 Build SetCookie from CookieJar 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
Stanislav Panferov
a85cc476e1 Basic Cookie and Set-Cookie (only parsing) headers implementation. 2014-11-10 12:31:33 -08:00
Sean McArthur
b7957ed36c Merge pull request #108 from hyperium/77-empty-responses
fix(client): GET and HEAD shouldn't add Transfer-Encoding
2014-11-10 09:41:25 -08:00
Sean McArthur
3b8c5cac1a fix(client): GET and HEAD shouldn't add Transfer-Encoding
Also adds an EmptyWriter, used for GET and HEAD requests,
which will return an io::ShortWrite error if the user ever tries
to write to a GET or HEAD request.

Closes #77
2014-11-09 20:56:59 -08:00
Sean McArthur
caab60e374 Merge pull request #94 from hyperium/authorization
Implemented a typed Authorization header
2014-11-08 20:55:08 -08:00
Sean McArthur
39e0829b4d Merge pull request #107 from hannobraun/connection
Make Connection usable
2014-11-08 20:24:33 -08:00
Hanno Braun
ab9c4f99b8 Make Connection usable
Connection's only field was private, making it impossible to construct a
Connection.
2014-11-08 22:51:28 +01:00
Sean McArthur
c32b15041a Merge pull request #105 from reem/hello-world
Add a simple threaded hello world example.
2014-11-07 16:17:20 -08:00
Jonathan Reem
a69b5ae166 Add a simple threaded hello world example. 2014-11-07 15:52:28 -08:00