Commit Graph

374 Commits

Author SHA1 Message Date
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
a0bf2a49f8 Merge pull request #249 from Manishearth/sslcontext
Allow more generic SSL verification (fixes #244)
2015-01-15 09:07:09 -08:00
Manish Goregaokar
bca9a53c66 feat(net): Move SSL verification to unboxed closures 2015-01-15 22:23:13 +05:30
Manish Goregaokar
af5778510d feat(net): Allow more generic SSL verification (fixes #244) 2015-01-14 19:29:48 +05:30
Sean McArthur
8f66de45cb v0.1.1 2015-01-13 12:00:54 -08:00
Sean McArthur
054fd514b8 Merge pull request #247 from hyperium/fix-header-fmt
fix(header): fix fmt_header outputs of several headers
2015-01-13 10:51:25 -08:00
Sean McArthur
aa26665367 fix(header): fix fmt_header outputs of several headers
Closes #246
2015-01-13 10:42:01 -08:00
Sean McArthur
cfebdabc1a Merge pull request #241 from retep998/master
Don't use Show to write UserAgent header
2015-01-12 09:05:55 -08:00
Sean McArthur
d80d3e017c Merge pull request #240 from cactorium/ssltry3
Added TLS/SSL support serverside
2015-01-12 09:04:23 -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
Kelvin Ly
c6eef68124 feat(server,net): Add TLS/SSL support serverside
Implements the missing enum cases in Http* and adds a new
method to the default Server implementation to take advantage
of the new TLS support

Closes #1
2015-01-11 23:33:11 -05:00
Sean McArthur
6442635499 Merge pull request #242 from hyperium/contributing
chore(git): add a CONTRIBUTING.md
2015-01-11 19:58:54 -08:00
Sean McArthur
f844ff336f chore(git): add a CONTRIBUTING.md 2015-01-11 19:52:45 -08:00
Sean McArthur
9fbf0aecb8 v0.1.0 2015-01-10 21:38:48 -08: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
Sean McArthur
5a5ef10f35 Merge pull request #234 from kstep/patch-1
fixes invalid format of mime types
2015-01-10 09:31:18 -08:00
Konstantin Stepanov
d60e54dc55 fixes invalid format of mime types
See also mime.rs/#14
2015-01-10 19:27:10 +03:00
Sean McArthur
4026ec1d73 Merge pull request #232 from cyderize/rustup
Update for latest Rust nightly
2015-01-10 00:45:24 -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
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
Sean McArthur
241ebc1270 Merge pull request #229 from globin/fix/macro_syntax
macro syntax changes
2015-01-09 12:10:09 -08:00
Robin Gloster
da0597510a macro syntax changes 2015-01-07 21:30:03 +01:00
Sean McArthur
2dd55d7ae0 Merge pull request #226 from alexandrubordei/master
Replaced deprecated reference to trim_chars with trim_matches
2015-01-06 17:34:38 -08:00
Sean McArthur
b45912dd16 Merge pull request #225 from pyfisch/accesscontrol
Added AccessControl* family of headers.
2015-01-06 17:31:47 -08:00
Sean McArthur
3e892fb4ea Merge pull request #228 from mlalic/chunksize-fix
Fix chunk size parsing: handle invalid chunk sizes
2015-01-06 16:09:51 -08:00
Marko Lalic
f327a7e737 Add regression tests for chunked request parsing
The tests assert that requests with a `Transfer-Encoding: chunked`
are correctly parsed both when the chunks are valid, as well as
invalid.
2015-01-06 22:15:18 +01:00
Marko Lalic
2357995cc9 Add regression tests for chunked response parsing
The tests assert that `Transport-Encoding: chunked` responses are
correctly handled both when the chunk sizes are valid, as well as
invalid.
2015-01-06 22:15:18 +01:00
Pyfisch
c228a5506a Worked on Access-Control-* header family. 2015-01-06 22:04:35 +01:00
Marko Lalic
b6a10e5c1e Fix chunk size parsing: handle invalid chunk sizes
Currently, when the chunk size was an invalid hex number (i.e.
contained a non-HEX octet), hyper would halt its parsing at the
last valid hex digit and report this as the chunk size.

For example, the following would be the chunk sizes reported for
some strings:

    "X" => 0
    "1X" => 1
    "aY" => 10
    "a;a" => 10 (only this should be correct!)

This fix makes it so that any chunk size, which cannot be parsed
as a valid hex number, causes an IoError. Additionally, the case
where the chunk size is followed by a chunk extension is also
handled (since the ";" token is a valid delimiter between the
chunk size and, as such, along with a LWS octet, represents a
valid terminal character of the chunk size).

Regression tests for the `get_chunk_size` function and included.
2015-01-06 21:47:07 +01:00
Pyfisch
0f781efd7b Merge branch 'master' into accesscontrol 2015-01-06 20:37:23 +01:00
Pyfisch
ffffa0cf39 Merge remote-tracking branch 'upstream/master' 2015-01-06 09:22:06 +01:00
Sean McArthur
92b836dc03 v0.0.21 2015-01-05 19:27:44 -08:00
Sean McArthur
b10fecbc8e Merge pull request #227 from hyperium/rustup
Rustup
2015-01-05 19:17:08 -08:00
Sean McArthur
23aeb4993a fix writing raw headers, quality_item 2015-01-05 19:16:34 -08:00
Jonathan Reem
4756544a18 Fix the benches for latest rust changes. 2015-01-06 01:24:00 +01: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
66aa08ecdd Make downcasting inherent methods on NetworkStream. 2015-01-06 01:15:32 +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
Pyfisch
d5160dc8a4 Revert "Added AccessControl* family of headers."
This reverts commit 568707c491.
2015-01-04 12:00:15 +01:00
Pyfisch
568707c491 Added AccessControl* family of headers.
Fixes #169
2015-01-04 11:50:50 +01:00
Jonathan Reem
7f3a33f903 #[deriving] -> #[derive] 2015-01-03 20:31:48 +01:00
Jonathan Reem
541e21dbd1 Update for unsafe-any changes. 2015-01-03 20:31:20 +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
08cc8aadcb Merge pull request #223 from Nercury/array-syntax-fallout
Array syntax fallout
2015-01-02 14:03:47 -08:00
Nerijus Arlauskas
0270c82786 Update to use new array syntax. 2015-01-03 00:01:27 +02:00
Sean McArthur
fc04086406 v0.0.20 2015-01-02 13:27:22 -08:00
Sean McArthur
2251b3b918 fix(rustup): unchecked_get
Closes #219
Closes #222
2015-01-02 13:25:41 -08:00