Commit Graph

123 Commits

Author SHA1 Message Date
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
9e3c94d764 fix(rustup): update to newest fmt trait names and slice syntax 2015-01-23 14:17:19 -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
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
ProtectedMode
115f56adf9 refactor(headers): make CacheDirective public 2015-01-21 21:43:38 +00:00
Alex Whitney
dd2534a686 fix(imports): Update TypeID import location to "any" 2015-01-21 18:54:57 +00:00
Pyfisch
8d0e5bc302 refactor(headers): export all headers and utils directly under header
Currently headers are exported at many places. For example you can access
`Transfer-Encoding` header at `header`, `header::common` and
`header::common::transfer_encoding`. Per discussion on IRC with
@seanmonstar and @reem, all contents of headers will be exposed at `header`
directly. Parsing utilities will be exposed at `header::parsing`. Header
macros can now be used from other crates.

This breaks much code using headers. It should use everything it needs
directly from `header::`, encodings are exposed at `header::Encoding::`,
connection options are exposed at `header::ConnectionOption`.
2015-01-20 13:04:42 +01:00
Sean McArthur
7a5813b4b2 Merge pull request #235 from kstep/referer-header
Add `Referer` header definition
2015-01-19 15:45:18 -08:00
Pyfisch
dfa5e69d7c refactor(headers): add header macros and add two example uses
Add `impl_header!` and `impl_list_header!` macros. Rewrite `Accept-Encoding`
and `Server` header implementations to use the new macros.
2015-01-15 19:26:33 +01:00
Sean McArthur
aa26665367 fix(header): fix fmt_header outputs of several headers
Closes #246
2015-01-13 10:42:01 -08:00
Peter Atashian
c8e334aaeb fix(headers): don't use Show to write UserAgent header
Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-01-11 23:36:17 -05:00
Sean McArthur
95f178653c Merge pull request #236 from hyperium/rustup
Rust up for nightly
2015-01-10 21:36:04 -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
Konstantin Stepanov
df857aa3f8 add referer header definition 2015-01-11 02:19:29 +03:00
Konstantin Stepanov
d60e54dc55 fixes invalid format of mime types
See also mime.rs/#14
2015-01-10 19:27:10 +03:00
cyderize
cc7fa15b04 Continue updating for latest rust
Fixed tests, however cannot link bench tests for some reason
2015-01-10 19:15:46 +11:00
cyderize
122e94c8a6 Update for latest rust
Tracks rust nightly.

7 tests fail -- still finding source
2015-01-10 18:37:10 +11:00
Pyfisch
c228a5506a Worked on Access-Control-* header family. 2015-01-06 22:04:35 +01:00
Pyfisch
0f781efd7b Merge branch 'master' into accesscontrol 2015-01-06 20:37:23 +01:00
Sean McArthur
23aeb4993a fix writing raw headers, quality_item 2015-01-05 19:16:34 -08:00
Jonathan Reem
93fcd05b9d Miscellaneous fixes and test updates for all the other changes
- http::LINE_ENDING is now an &'static str
2015-01-06 01:15:47 +01:00
Jonathan Reem
f0fe878ec8 More Rust updates:
- Some stray deriving -> derive changes
- use::{mod} -> use::{self}
- fmt.write -> fmt.write_str

This does not catch the last case of fmt.write_str in the
Show impl of a Header Item. This will need to be changed
separately.
2015-01-05 22:50:10 +01:00
Pyfisch
60ada12b3c Added AccessControl* family of headers.
Fixes #169
2015-01-04 12:04:32 +01:00
Jonathan Reem
7f3a33f903 #[deriving] -> #[derive] 2015-01-03 20:31:48 +01:00
Pyfisch
76126fc6c7 feat(headers): adds Accept
Moved utils to shared/. Added quality_value.
2015-01-03 11:06:38 -08:00
Sean McArthur
2251b3b918 fix(rustup): unchecked_get
Closes #219
Closes #222
2015-01-02 13:25:41 -08:00
Michael Kovalchik
5dd4529165 Use renamed unsafe_get and concat_vec methods.
Changed calls to unsafe_get to use get_unchecked and calls to concat_vec
to use concat to avoid deprecation lints.
2015-01-02 13:18:48 -08:00
Andrey Davydov
4a7696280f compilation fix
compilation fix for rust version "rustc 0.13.0-nightly (7608dbad6 2014-12-31 10:06:21 -0800)"
2015-01-01 10:58:50 +03:00
Antti Keränen
05ddfd10a2 Changed deprecated trim_chars to trim_matches 2014-12-30 16:22:45 +02:00
Sean McArthur
451074b0a6 rust upgrade 2014-12-29 17:42:48 -08:00
Sean McArthur
f75e9bfaaa Merge pull request #215 from pyfisch/fixcommadelimited
Fixes from_one_comma_delimited, no more split at space
2014-12-29 14:42:17 -08:00
Pyfisch
eac6fe7c93 Fixes from_one_comma_delimited, no more split at space
Before from_one_comma_delimited split at ",", and " "
this made it unusable for the Accept-* headers since
their fields may contain whitespace.
2014-12-29 21:03:24 +01:00
Pyfisch
5fccdea90d Fixes #211 and adds one test for it. 2014-12-29 12:15:08 +01:00
Sean McArthur
84b49cb364 other rustup fallout 2014-12-23 14:04:21 -08:00
Sean McArthur
79fc40cbce into_string to to_string, from_str to parse 2014-12-23 13:09:58 -08:00
Sean McArthur
691c70a380 update str::from_utf8 2014-12-23 12:55:53 -08:00
Jonathan Reem
90925f05ee (fix) Add semicolons at macro invocation sites. 2014-12-20 02:38:03 -08:00
Sean McArthur
d19cfed422 Merge pull request #182 from hyperium/client
feat(client): add a new Client struct with super powers
2014-12-14 12:02:13 -08:00
Sean McArthur
8c83a3358e feat(client): add a new Client struct with super powers
- Includes ergonomic traits like IntoUrl and IntoBody, allowing easy
usage.
- Client can have a RedirectPolicy.
- Client can have a SslVerifier.

Updated benchmarks for client. (Disabled rust-http client bench since it
hangs.)
2014-12-14 11:56:39 -08:00
Sean McArthur
2d6c8819cd Merge pull request #193 from wenderen/vary-header
add vary header, first draft
2014-12-13 12:31:40 -08:00
Sean McArthur
0bba6e80ee rust upgrade 2014-12-12 12:24:54 -08:00
Rohan Prinja
258e739ef8 add vary header, first draft 2014-12-12 19:12:55 +05:30
Rohan Prinja
4bae6b7e0e add allow header 2014-12-11 00:18:32 +05:30
Sean McArthur
89bedd30ba rustup for clone trait 2014-12-09 16:50:49 -08:00
Sean McArthur
514f96e9eb Merge pull request #180 from wenderen/etag-header
add etag header
2014-12-07 23:48:10 -08:00
Rohan Prinja
c4efa80fb5 add etag header 2014-12-08 13:08:53 +05:30
Corey Richardson
6d91693a41 Add missing reexport 2014-12-07 18:51:50 -05:00
Corey Richardson
e2d387d118 header: add If-Modified-Since support 2014-12-07 18:48:05 -05:00
Kyle Dewey
4febf65a88 Removed now-deprecated Equiv implementation 2014-12-04 14:10:56 -08:00
Sean McArthur
9a2605a138 Merge pull request #165 from hyperium/expires
Adds CacheControl, Expires, and LastModified headers
2014-12-02 21:22:32 -08:00