Commit Graph

2501 Commits

Author SHA1 Message Date
Michael Hart
1acf567061 Update hash_map and fmt usages
Depends on https://github.com/carllerche/curl-rust/pull/24 and
https://github.com/chris-morgan/rust-http/pull/167
2014-11-04 12:34:35 -05:00
Sean McArthur
b508e913a1 Merge pull request #95 from jamwt/remove_coll_traits
Move len/clear from trait implementations to inherent methods
2014-11-03 21:22:24 -08:00
Jamie Turner
f88837f172 Add len() test with redundant header. 2014-11-03 21:08:55 -08:00
Jamie Turner
14687ad6d2 Re-add len() and clear() as inherent Headers methods. 2014-11-03 21:06:30 -08:00
Jamie Turner
bef7da153c Remove collections trait implementations.
Rust has removed them due to collections reform RFC:

RFC: https://github.com/rust-lang/rfcs/pull/235/files
Commit:
21ac985af4
2014-11-03 18:30:16 -08:00
Gilman Tolle
91a8e03e7a Implemented a typed Authorization header
An Authorization header contains a Scheme. If you have no real scheme,
you can use String as your scheme (Authorization<String>).

This includes the `Basic` scheme built-in.
2014-10-31 18:51:23 -07:00
Sean McArthur
7478f3dfd6 Merge pull request #93 from hyperium/split-networkstream
split NetworkStream::connect to NetworkConnector
2014-10-31 16:04:35 -07:00
Sean McArthur
4dd1fc5642 update benches with trait splits 2014-10-31 16:00:34 -07:00
Sean McArthur
f117ebe367 fix missing_docs lint name 2014-10-31 15:49:53 -07:00
Sean McArthur
3cd7d72b07 split NetworkStream::connect to NetworkConnector 2014-10-31 15:49:26 -07:00
Sean McArthur
2d1ad7a2fa Merge pull request #92 from reem/header-trait-split
Split Header into Header and HeaderFormat
2014-10-31 15:20:55 -07:00
Jonathan Reem
0652858dbf Update all common headers for the new Header trait split 2014-10-31 15:10:34 -07:00
Jonathan Reem
00bc001e59 Split Header into Header and HeaderFormat
Header contains all of the trait-object unsafe methods
including the name of the header and parsing. HeaderFormat
contains fmt_header, which is the only trait-object safe
method.
2014-10-31 15:09:42 -07:00
Sean McArthur
3dd61b4600 Merge pull request #59 from hyperium/upgrade
add bits to deal with Upgrade requests
2014-10-31 10:34:02 -07:00
Jonathan Reem
7b60dcbdd5 Merge pull request #91 from hyperium/fix/fail-to-panic
(fix) fail! to panic!
2014-10-30 14:44:58 -07:00
Jonathan Reem
60af7c4565 (fix) fail! to panic! 2014-10-30 01:08:46 -07:00
Sean McArthur
0ab52c9009 add bits to deal with Upgrade requests 2014-10-27 20:36:57 -07:00
Sean McArthur
41164fece9 Merge pull request #70 from hyperium/raw
add Headers.set_raw, remove unsafe from .get_raw
2014-10-27 18:05:02 -07:00
Sean McArthur
8cf8d5ac03 add Headers.set_raw, remove unsafe from .get_raw
Internal representation was changed from an enum back to a Struct again.
The raw representation *has* to stick around, even if parsed as a proper
typed header. The reason is that internally, hyper will access some
headers to know which parts of the http protocol to follow (such as if
the response has a length or is chunked). The raw value may still be
needed afterwards, such as for a DOM binding of
.getAllResponseHeaders().

Since the raw is kept around, the unsafety of get_raw is no longer true,
and so that is removed.

It's still more ergonomic to access the types, and safer as well, so
that is recommended when possible.
2014-10-27 17:58:21 -07:00
Sean McArthur
68e2278339 update mime.rs dependency url 2014-10-24 09:55:44 -07:00
Sean McArthur
600c1e07bc Update README.md 2014-10-23 10:38:45 -07:00
Sean McArthur
19045a2376 change Host header to have hostname and port 2014-10-22 18:29:49 -07:00
Hanno Braun
224cc709c3 Include port in Host header
Fixes #88.
2014-10-22 18:29:05 -07:00
Sean McArthur
50a6f6103e Merge pull request #87 from mhart/silence-constant-warning
Uppercase phrase constant to remove warnings
2014-10-18 16:28:13 -07:00
Jonathan Reem
7fa17db1ca Merge pull request #86 from mhart/remove-debug-crate
Remove debug crate from examples
2014-10-18 15:57:09 -07:00
Michael Hart
1222948414 Uppercase phrase constant to remove warnings
Latest 0.13.0-nightly gives this:

warning: static constant `phrase` should have an uppercase name such as
`PHRASE`, #[warn(non_upper_case_globals)] on by default
2014-10-18 18:46:02 -04:00
Michael Hart
262a1658cf Remove debug crate
This fixes errors with latest 0.13.0-nightly as crate has been removed:

`error: can't find crate for ‘debug’`
2014-10-18 18:39:03 -04:00
Jonathan Reem
0fcbdc34f2 Merge pull request #84 'optimize-method-parsing' 2014-10-17 01:40:32 -07:00
Austin Bonander
ab396c2394 Fix and optimize HTTP method parsing
The old parser used a manually unrolled state machine
and was broken due to upstream rust issues with match
statements.

The new parser is a read into a stack-allocated buffer
followed by a single match on the contents of that
buffer.

This significantly improves the benchmarks for method
reads by almost 30%, in addition to working around
the upstream rust issues with reordering match blocks.
2014-10-17 01:35:11 -07:00
Jonathan Reem
b285451e21 Merge pull request #79 from reem/readme-warning
Add a warning about the stability of Hyper to the README.
2014-10-15 23:57:50 -07:00
Jonathan Reem
f43d3cbc81 Merge pull request #83 from gtolle/expose-from-one-raw-str
Exposed the 'from_one_raw_str' function for use in defining new headers
2014-10-15 23:57:40 -07:00
Gilman Tolle
5615ab276e Exposed the 'from_one_raw_str' function for use in defining new header structs. 2014-10-15 23:40:40 -07:00
Jonathan Reem
1dcc600c5c Add a warning about the stability of Hyper to the README. 2014-10-14 19:42:10 -07:00
Jonathan Reem
2ea75c967d Merge pull request #78 from hyperium/headers-fmt
Minor internal cleanup of header formatting
2014-10-13 19:57:42 -07:00
Sean McArthur
e6329af74e Slice was changed to AsSlice in libstd 2014-10-13 18:37:14 -07:00
Sean McArthur
2f755a5694 move rendering of headers to the Headers object 2014-10-13 14:32:48 -07:00
Sean McArthur
f2d2ed93d3 Merge pull request #76 from hyperium/fix-query
fix client requests dropping the query string. fixes #75
2014-10-13 13:19:41 -07:00
Sean McArthur
61e18141be fix client requests dropping the query string. fixes #75 2014-10-13 10:16:45 -07:00
Jonathan Reem
08402a1cbf Merge pull request #74 from s-panferov/fix/use-const
Use `const` instead of `static`
2014-10-11 00:46:58 -07:00
Stanislav Panferov
e7a2688b7e Use const instead of static 2014-10-11 11:00:10 +04:00
Jonathan Reem
119ca21f30 Merge pull request #73 from s-panferov/fix/abstract-is-reserved
(fix) abstract is now a reserved word.
2014-10-09 23:56:43 -07:00
Stanislav Panferov
d5e33ca9db (fix) abstract is now a reserved word. 2014-10-10 10:52:47 +04:00
Sean McArthur
a70a12dd89 Merge pull request #72 from hyperium/header-name-string
adjust RawHeaderLine to be (String, Vec<u8>)
2014-10-08 17:43:08 -07:00
Sean McArthur
50a2112caf adjust RawHeaderLine to be (String, Vec<u8>) 2014-10-07 15:30:02 -07:00
Sean McArthur
233d7c4190 Merge pull request #69 from s-panferov/feature/accept-header-parsing
Implement the basic parsing for Accept header.
2014-10-06 11:32:19 -07:00
Stanislav Panferov
2995923505 Fix review comments 2014-10-06 22:27:08 +04:00
Stanislav Panferov
f6ac243c85 Implement the basic parsing for Accept header. 2014-10-06 19:56:32 +04:00
Sean McArthur
46e1f4443f Merge pull request #68 from s-panferov/feature/location-header
Add Location header
2014-10-05 13:26:43 -07:00
Stanislav Panferov
10db5ee896 Add Location header 2014-10-05 20:05:27 +04:00
Jonathan Reem
7d86296169 Migrated from .. to ... to respond to upstream changes. 2014-10-04 02:44:57 -07:00