Commit Graph

935 Commits

Author SHA1 Message Date
Sam Gibson
7c2e5124e6 feat(headers): add strict-transport-security header
Strict-Transport-Security allows servers to inform user-agents that
they'd like them to always contact the secure host (https) instead of
the insecure one (http).

Closes #589
2015-07-06 12:35:45 -07:00
Sean McArthur
9a85ea553f Merge pull request #595 from pyfisch/originstring
refactor(headers): use String in Access-Control-Allow-Origin header
2015-07-06 11:00:49 -07:00
Pyfisch
ed458628e5 refactor(headers): use String in Access-Control-Allow-Origin header
Access-Control-Allow-Origin origins are URLs but they do not need to
be valid, they should just be compared as strings. So to support
invalid URLs hyper should use a string instead.

closes #526

BREAKING CHANGE: Access-Control-Allow-Origin does no longer use Url
2015-07-04 17:26:06 +02:00
Sean McArthur
3a5c56cc5e Merge pull request #593 from hyperium/client-response-url
feat(client): add url property Response
2015-07-01 11:11:32 -07:00
Sean McArthur
82ed9092e3 feat(client): add url property Response
This will always be the last URL that was used by the Request, which is
useful for determining what the final URL was after redirection.

BREAKING CHANGE: Technically a break, since `Response::new()` takes an
  additional argument. In practice, the only place that should have been
  creating Responses directly is inside the Client, so it shouldn't
  break anyone. If you were creating Responses manually, you'll need to
  pass a Url argument.
2015-07-01 10:45:07 -07:00
Sean McArthur
5978f7c630 docs(readme): add appveyor badge to readme
Closes #513
2015-06-30 15:08:34 -07:00
Sean McArthur
2187b5561f test(windows): add appveyor ci 2015-06-30 15:04:18 -07:00
Sean McArthur
b57bba3517 Merge pull request #587 from pyfisch/nice-code
style(rustfmt): run rustfmt on hyper correct overlong lines
2015-06-29 14:21:02 -07:00
Pyfisch
db93ca0697 style(rustfmt): run rustfmt on hyper correct overlong lines 2015-06-29 20:22:22 +02:00
Sean McArthur
990819a6d6 v0.6.1 2015-06-26 21:28:40 -07:00
Sean McArthur
31e5a91350 Merge pull request #582 from mlalic/issue-580
refactor(http2): move to solicit v0.4
2015-06-26 21:18:22 -07:00
Sean McArthur
cc4d1f3bb3 Merge pull request #584 from infinityb/sni-fix
fix(client): use Ssl instance in creation of SslStream
2015-06-26 21:16:43 -07:00
Sean McArthur
3abe323ef7 Merge pull request #583 from Byron/osx-compilation
fix(cargo): fix linking on OSX 10.10
2015-06-26 21:16:09 -07:00
Sean McArthur
d3d9d8c812 Merge pull request #581 from Byron/fix-benches
fix(benches): adjust to missing `set_ssl_verifier`
2015-06-26 21:14:22 -07:00
Stacey Ell
1a490e25c3 fix(client): use Ssl instance in creation of SslStream
This fix brings SNI into working order
2015-06-26 09:27:27 -06:00
Sebastian Thiel
9af2b66fe4 fix(cargo): fix linking on OSX 10.10
On OSX 10.10, attempting to run `cargo test` will yield a
[linker error](https://gist.github.com/Byron/b7a50cdcf7c60234335d).

Just removing the feature fixes the issue, even though I am not
sure if it is breaking something further down the line.
2015-06-26 15:39:17 +02:00
Marko Lalic
37e55944cf test(hyper): assert that error::Error is Send + Sync
This is a regression test for #580.
2015-06-26 14:53:58 +02:00
Marko Lalic
526ce994a3 refactor(http2): move to solicit v0.4
Only minor details in the internals of the `h2` module needed tweaking
for migrating onto the latest version -- `HttpConnect` implementations
are now required to return an error type that implements an
`HttpConnectError` trait.
2015-06-26 14:53:58 +02:00
Sebastian Thiel
eb38a11b9a fix(benches): adjust to missing set_ssl_verifier
In 53bba6e , ssl usage was improved. The existing benchmark
implementation wasn't adjusted though.

This commit fixes the client benchmark to work with the latest nightly
rust and instructs travis to try compile the benchmarks
when rustc nightly is used. This should prevent such kind of breakage
in future.
2015-06-26 14:06:47 +02:00
Sean McArthur
5bf91f09ee v0.6.0 2015-06-25 10:21:44 -07:00
Sean McArthur
1b6c692fe3 Merge pull request #578 from lame-nickname/master
refactor(headers):  improve `Range` header adherence to HTTP spec
2015-06-23 17:05:23 -07:00
Sean McArthur
03bbd23a84 Merge pull request #579 from pyfisch/language-tags
feat(langtags): use true language tags in headers
2015-06-23 17:04:42 -07:00
lame-nickname
f7504c3a9c refactor(headers): improve Range header adherence to HTTP spec 2015-06-23 20:59:34 +02:00
Pyfisch
99ff7e6257 feat(langtags): use true language tags in headers
Make hyper dependant on rust-language-tags providing complete parsing
and formatting of language tags. Remove builtin solution for simple
tags.

BREAKING CHANGE: AcceptLanguage and ContentLanguage use LanguageTag now,
Language removed from Hyper.
2015-06-23 20:15:47 +02:00
Sean McArthur
c3935d657e Merge pull request #577 from hyperium/ssl
feat(ssl): redesign SSL usage
2015-06-20 18:16:02 -07:00
Sean McArthur
53bba6eb7f feat(ssl): redesign SSL usage
BREAKING CHANGE: Server::https was changed to allow any implementation
  of Ssl. Server in general was also changed. HttpConnector no longer
  uses SSL; using HttpsConnector instead.
2015-06-20 14:58:58 -07:00
Sean McArthur
e689f20376 fix(client): check for drained stream in Response::drop 2015-06-17 13:17:56 -07:00
Sean McArthur
306f39c731 chore(logging): add some trace! logging to headers 2015-06-17 11:37:26 -07:00
Sean McArthur
7d2e5c0ef8 style(client): use status.is_redirection() 2015-06-17 11:36:54 -07:00
Sean McArthur
3f1fc19d5a Merge pull request #576 from mlalic/fix-html-root-url
docs(hyper): fix html root url
2015-06-17 08:54:44 -07:00
Marko Lalic
aee7c991e6 docs(hyper): fix html root url
The HTML root URL is not supposed to point at the index resource, but
represent the path that can be used to construct the full URL of the
crate's components.
2015-06-17 17:42:57 +02:00
Sean McArthur
e5dfb8233f Merge pull request #572 from giftcards/master
feat(headers): add bearer token support
2015-06-16 22:51:13 -07:00
Joseph Deray
edf6ac2074 feat(headers): add bearer token support
this allows servers/clients using bearer tokens
 to work out of the box without having to implement
  their own bearer scheme. while this would be pretty
   easy seems like a more general thing that is useful
    for a lib like this
2015-06-17 00:57:04 -04:00
Sean McArthur
41823ca183 Merge pull request #560 from lame-nickname/master
feat(headers): add `Range` header
2015-06-16 10:43:48 -07:00
lame-nickname
05c3199846 feat(headers): add Range header 2015-06-16 18:28:48 +02:00
Sean McArthur
febf3031c5 Merge pull request #567 from clatour/header-docs
docs(headers): add examples
2015-06-15 10:15:17 -07:00
Chandler Latour
c940e84a78 docs(headers): add header examples 2015-06-14 21:32:33 -06:00
Sean McArthur
c37d85728f Merge pull request #565 from hyperium/dox-server
docs(server): greatly expand how to use a Server
2015-06-14 08:41:44 -07:00
Sean McArthur
ae5c7276c0 docs(server): greatly expand how to use a Server 2015-06-13 17:02:35 -07:00
Sean McArthur
5a9c41a2a1 Merge pull request #566 from Ryman/patch-1
docs(header): fix typos and minor rewording
2015-06-13 11:10:52 -07:00
Ryman
8275f3b9e3 docs(header): fix typos and minor rewording 2015-06-13 16:53:26 +01:00
Sean McArthur
6d72289394 Merge pull request #564 from hyperium/doxup
docs(header): greatly expand on implementing custom headers
2015-06-13 08:34:50 -07:00
Sean McArthur
a8e29efdec docs(header): greatly expand on implementing custom headers 2015-06-12 15:20:58 -07:00
Sean McArthur
fe859cae61 Merge pull request #563 from hyperium/assert-sync
feat(client): impl Sync for Client
2015-06-12 11:59:46 -07:00
Sean McArthur
7452dfab69 docs(CONTRIBUTING): add link to easy issues 2015-06-12 11:29:27 -07:00
Sean McArthur
64e47b4bbd feat(client): impl Sync for Client
Connector::connect already used &self, and so would require
synchronization to be handled per connector anyway. Adding Sync to the
Client allows users to setup config for a Client once, such as using a
single connection Pool, and then making requests across multiple
threads.

Closes #254

BREAKING CHANGE: Connectors and Protocols passed to the `Client` must
  now also have a `Sync` bounds, but this shouldn't break default usage.
2015-06-12 11:19:54 -07:00
Sean McArthur
d7fa961a79 Merge pull request #562 from pyfisch/parseerror
refactor(headers): errors for parse_header
2015-06-10 16:01:21 -07:00
Pyfisch
195a89fa91 refactor(headers): errors for parse_header
Header::parse_header() returns now a hyper Result instead of an option
this will enable more precise Error messages in the future, currently
most failures are reported as ::Error::Header.

BREAKING CHANGE: parse_header returns Result instead of Option, related
code did also change
2015-06-10 22:22:56 +02:00
Sean McArthur
b2eb4e5171 Merge pull request #559 from hyperium/unsudo
chore(travis): remove sudo need from kcov
2015-06-08 19:22:37 -07:00
Sean McArthur
07c6bc7731 chore(travis): remove sudo need from kcov 2015-06-08 19:14:10 -07:00