Commit Graph

2486 Commits

Author SHA1 Message Date
Jonathan Reem
b1684ff027 Merge pull request #147 from hyperium/empty-reader
feat(server): properly handle requests that shouldn't have bodies
2014-11-24 22:08:45 -08:00
Sean McArthur
a60a67cd1e feat(server): properly handle requests that shouldn't have bodies 2014-11-24 21:27:59 -08:00
Jonathan Reem
a355092a93 Merge pull request #135 from hyperium/raw-status
feat(client): add a status_raw value
2014-11-24 20:48:11 -08:00
Sean McArthur
486080b044 feat(client): add a status_raw value 2014-11-24 19:49:12 -08:00
Sean McArthur
de17901adb Merge pull request #144 from emk/method-eq
Allow hyper::method::Method to be put in HashMap
2014-11-24 17:38:55 -08:00
Eric Kidd
ccef7953f8 Add some basic tests for hyper::method::Method
This test case does not attempt to test all the methods exhaustively,
but it does at least test all the methods in the APIs.  There's also a
check to make sure that Method can be used as part of a hash-table key.
2014-11-24 20:23:37 -05:00
Eric Kidd
91112516fc Allow hyper::method::Method to be put in HashMap
This is needed for porting iron/router to hyper.
2014-11-24 20:23:37 -05:00
Sean McArthur
caf5a19941 Merge pull request #145 from hoeppnertill/master
Fix for ASCII_LOWER_MAP visibility and deprecation warnings
2014-11-24 13:17:55 -08:00
Till Hoeppner
8bb5f0420b Fix for ASCII_LOWER_MAP visibility and deprecation warnings 2014-11-24 21:19:46 +01:00
Jonathan Reem
eb7217eaaa Merge pull request #143 from cybergeek94/master
Compile error and ChunkedReader bugfix
2014-11-24 03:14:06 -08:00
Austin Bonander
ff76e1c837 Fuse ChunkedReader after end
Remove debug
2014-11-24 02:27:06 -08:00
Austin Bonander
34203aa608 Fix compile error 2014-11-24 02:13:35 -08:00
Sean McArthur
ad942a12f8 Merge pull request #141 from reem/header-show
feat(headers): Added a HeaderFormatter for getting the HTTP representation of a header.
2014-11-24 00:09:02 -08:00
Jonathan Reem
c79e6f0aa5 feat(headers): Added a HeaderFormatter for getting the HTTP representation of a header. 2014-11-23 22:30:26 -08:00
Sean McArthur
b4ad2c98da Merge pull request #139 from barosl/is_uppercase
std::char::is_uppercase() -> std::char::UnicodeChar::is_uppercase()
2014-11-22 16:31:25 -08:00
Barosl Lee
c1c0103225 Accept any token to be a valid request method
- Rename read_until_space() to read_token_until_space()
- Check if the byte is part of the token in read_token_until_space()
- Return HttpMethodError if the token is empty
- Remove the unnecessary is_valid_method() function
2014-11-23 09:17:45 +09:00
Sean McArthur
ad75fc62ef Merge pull request #138 from chris-morgan/master
Drop the unnecessary dependency on `typeable`.
2014-11-21 23:56:39 -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
Jonathan Reem
368e46d3d9 Merge pull request #118 from hyperium/headers-clone
make Headers implement Clone
2014-11-21 05:16:38 -08:00
Jonathan Reem
2186d13b04 Merge pull request #129 from reem/fix-readme-examples
fix(readme): make the server example compile.
2014-11-20 21:53:36 -08:00
Sean McArthur
91ebf78f0e Merge pull request #116 from hyperium/server-keep-alive
feat(server): keep-alive!
2014-11-20 21:51:08 -08: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
Sean McArthur
1f2f93cfea Merge pull request #133 from hyperium/rustup
rustup: fmt changes
2014-11-20 16:26:52 -08:00
Sean McArthur
97c8276134 adjust doc comment about Unsigned 2014-11-20 16:25:33 -08:00
Sean McArthur
626fe9d91e rustup: fmt changes 2014-11-20 10:28:09 -08:00
Sean McArthur
ee9d807f76 Merge pull request #130 from reem/move-deconstruct
refactor(response): made deconstruct available on all response types.
2014-11-20 09:27:21 -08:00
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