Commit Graph

601 Commits

Author SHA1 Message Date
Tom Burdick
13a6a59d9d perf(http): reduce memcpy calls using boxed pimpl
All of the move semantics remain the same for http::Conn while
the self consumption and move semantics only require a pointer copy
now rather than copying larger amounts of data. This greatly improves
the performance of hyper, by my measurements about 125% faster when
benchmarking using wrk.
2016-06-14 11:28:09 -07:00
Sean McArthur
dabe3ac0b1 Merge pull request #827 from hyperium/enc-dec-get-ref
add get_ref methods to Encoder and Decoder
2016-06-14 20:18:28 +02:00
Sean McArthur
766377cfe7 feat(http): add get_ref methods to Encoder and Decoder 2016-06-14 10:55:37 -07:00
leonardo.yvens
d4a095d75c refactor(multiple): Clippy run 2016-06-12 15:17:15 -03:00
Sean McArthur
42ebb768c3 chore(client): remove dead pool module 2016-06-01 18:28:33 -07:00
Sean McArthur
d80d61cd78 perf(headers): check for header literals before allocating name 2016-06-01 15:09:54 -07:00
Sean McArthur
9338878576 perf(headers): use a Vec instead of HashMap internally 2016-06-01 11:56:35 -07:00
Sean McArthur
8017dac175 chore(http): reduce some logs from error level 2016-05-29 15:50:04 -07:00
Sean McArthur
cee36d4305 feat(client): add Request.set_uri(RequestUri) method (#803) 2016-05-24 11:38:11 -07:00
Sean McArthur
2d9aea8db0 fix(client): send query parameters in Requests 2016-05-23 11:19:43 -07:00
Justin Mayhew
8f1c536007 docs(*): fix typos, Markdown inconsistencies, and stutter 2016-05-20 11:42:29 -03:00
Sean McArthur
c81deed3e6 fix(windows): disable openssl cert validation for Windows
It doesn't work, so it's just causing errors.

Closes #794
2016-05-18 10:04:39 -07:00
softprops
088822b23d feat(net): Add OpensslClient constructor 2016-05-17 00:00:35 -04:00
Sean McArthur
38aa51495a feat(uri): impl Eq and Hash for RequestUri 2016-05-16 09:51:18 -07:00
Sean McArthur
d35992d019 feat(lib): switch to non-blocking (asynchronous) IO
BREAKING CHANGE: This breaks a lot of the Client and Server APIs.
  Check the documentation for how Handlers can be used for asynchronous
  events.
2016-05-16 09:51:18 -07:00
Sean McArthur
54bf6adeee fix(ssl): use secure ciphers by default in openssl 2016-05-09 12:47:09 -07:00
Sean McArthur
e7229480ea fix(warnings): remove unused_code warnings from newest nightlies 2016-05-09 11:51:51 -07:00
Sean McArthur
01160abd92 feat(ssl): enable hostname verification by default for OpenSSL
Additionally disables SSLv2 and SSLv3, as those are universally considered
unsafe.

Closes #472
2016-05-08 10:04:37 -07:00
Sean McArthur
17f818e5c1 Merge pull request #781 from hyperium/pool-mutex-race
fix(client): fix panic in Pool::connect
2016-05-05 12:16:47 -07:00
Sean McArthur
e51bafe2e4 fix(client): fix panic in Pool::connect
Closes #780
2016-05-05 10:45:16 -07:00
Manish Goregaokar
b840963629 docs(*): Clippy fixes with markdown docs 2016-05-05 22:50:23 +05:30
Sean McArthur
f36c6b255f feat(client): proper proxy and tunneling in Client
Closes #774
2016-05-02 12:33:49 -07:00
Sean McArthur
25010fc1fc feat(client): add Proxy support
This works by configuring proxy options on a `Client`, such as
`client.set_proxy("http", "127.0.0.1", "8018")`.

Closes #531
2016-04-25 15:49:57 -07:00
Sean McArthur
5fcc04a6cd perf(client): dont keep Pool mutex locked during getaddrinfo 2016-04-25 15:36:55 -07:00
Simon Sapin
8fa7a98968 refactor(hyper): Update to rust-url 1.0
BREAKING CHANGE: The re-exported Url type has breaking changes.
2016-04-21 16:14:08 -07:00
Steven Fackler
f37315b270 feat(net): Add Ssl impls for security-framework
Cloese #755
2016-04-16 16:20:52 -07:00
Steven Fackler
2c86e8078e feat(net): Split Ssl into SslClient and SslServer
SSL libraries other than OpenSSL don't necessarily have the ability to
easily create server and client side connections at the same time. This
is backwards compatible due to blanket impls.

Closes #756
2016-04-05 21:48:53 -07:00
Sean McArthur
bc3878de36 Merge pull request #750 from calebmer/feat/prefer
feat(header): add prefer and preference applied headers
2016-03-31 18:56:58 -07:00
calebmer
6f6493010a feat(header): add prefer and preference applied headers
Closes #747
2016-03-31 15:46:34 -04:00
Sean McArthur
cbf83a4d5a Merge pull request #751 from hyperium/per-tag-docs
chore(docs): publish docs per version
2016-03-24 19:52:47 -07:00
Sean McArthur
905e0d2ff4 chore(docs): publish docs per version 2016-03-24 18:57:23 -07:00
Steven Allen
70c6914217 fix(headers): correctly handle repeated headers
HeaderX: a
    HeaderX: b

MUST be interpreted as

    HeaderX: a, b

See: https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2

Fixes #683
2016-03-24 14:19:15 -07:00
Danilo Bargen
eedd5b73ee docs(headers): Remove charset from json() docs
Leftover from ec568e9a55.
2016-03-15 12:33:32 +01:00
Jonathan Giddy
93fd5a87bd feat(status): add HTTP statuses 421 and 451
The official IANA list at
http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
has two new status codes that are missing from the hyper status list.
2016-03-14 10:31:54 +00:00
Sean McArthur
d1f9f5f694 Merge pull request #736 from debris/serde_up
refactor(headers): updated serde to version 0.7
2016-03-09 11:01:18 -08:00
Garrett Squire
ec568e9a55 fix(headers): remove charset from ContentType::json() convenience method
since the JSON mime type does not accept a charset, this patch removes
it

closes https://github.com/hyperium/hyper/issues/737
2016-03-08 17:41:34 -08:00
OlegTsyba
c720295e99 fix(buffer): prevent possible buffer overflow in grow_zerofill
in `maybe_reserve` we have such code
    ```
        let new = self.buf.capacity() - self.buf.len();
        unsafe { grow_zerofill(&mut self.buf, new) }
    ```
    the original behavior of `grow_zerofill` in such case cause
    rewriting the memory behind the allocated vector.
2016-03-02 17:20:18 +02:00
debris
33d5da2136 refactor(headers): updated serde to version 0.7 2016-02-27 15:04:30 +01:00
Johan Lorenzo
5c8b63028c docs(server): add a warning to Listening::close() in order to reflect #338 2016-02-19 14:25:12 +01:00
OlegTsyba
7c76fff3aa fix(net): fix the typo in set_write_timeout 2016-02-17 19:13:40 +02:00
Steven Fackler
8c7ef7fd93 feat(client): Implement Debug for Client
Protocol doesn't extend Debug so we have to leave that out of the
output unfortunately.
2016-02-15 14:43:50 -08:00
Sean McArthur
3a18e72be6 fix(buffer): fix incorrect resizing of BufReader
Closes #715
2016-01-04 15:00:37 -08:00
Mark Lee
f7d6ff67ee docs(headers): add docs for ExtendedValue members 2015-12-31 12:12:51 -08:00
Mark Lee
da0abe8988 feat(headers): allow ExtendedValue structs to be formatted and used as struct members 2015-12-31 12:12:51 -08:00
Corey Farwell
4c7f6f0c1e style(all): Address suggestions made by rust-clippy 2015-12-23 08:59:45 -08:00
Sean McArthur
69adbd1914 style(client): change instances of method::Method to Method 2015-12-19 13:59:33 -08:00
Steven Fackler
92ff50f2e5 fix(server): Flush 100-continue messages
Closes #704
2015-12-18 16:00:49 -08:00
Mark Lee
402fb76bb2 feat(headers): add extended parameter parser to the public API
Move the extended parameter parser from the Content-Disposition header
implementation into the common header parsing module. This allows crates that
use Hyper to parse RFC 5987-compliant header parameter values.
Add tests based on the examples given in the RFC.
2015-12-15 09:56:09 -08:00
Karl Hobley
1077440c4d test(server): Add test for GET request with body 2015-11-29 18:06:44 +00:00
Karl Hobley
0b05c5903e fix(server): Removed check for GET/HEAD request when parsing body
Fixes #698
2015-11-29 18:06:44 +00:00