Commit Graph

26 Commits

Author SHA1 Message Date
Sean McArthur
3b8c5cac1a fix(client): GET and HEAD shouldn't add Transfer-Encoding
Also adds an EmptyWriter, used for GET and HEAD requests,
which will return an io::ShortWrite error if the user ever tries
to write to a GET or HEAD request.

Closes #77
2014-11-09 20:56:59 -08:00
Sean McArthur
3d7820d17e update using ToSocketAddr 2014-11-06 17:55:32 -08:00
Sean McArthur
3cd7d72b07 split NetworkStream::connect to NetworkConnector 2014-10-31 15:49:26 -07:00
Sean McArthur
0ab52c9009 add bits to deal with Upgrade requests 2014-10-27 20:36:57 -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
2f755a5694 move rendering of headers to the Headers object 2014-10-13 14:32:48 -07:00
Sean McArthur
61e18141be fix client requests dropping the query string. fixes #75 2014-10-13 10:16:45 -07:00
Stanislav Panferov
d5e33ca9db (fix) abstract is now a reserved word. 2014-10-10 10:52:47 +04:00
Jonathan Reem
d3a62fa0d5 Add get_mut for modifying the typed representation of Headers.
Also adds an associated test and updates code to use it instead
of cloning and setting when possible.
2014-09-27 00:17:59 -04:00
Jonathan Reem
858a09304a Remove get and rename get_ref to get
Since `get_ref` (now `get`) takes `&self` there is no need
for a special cloning method.
2014-09-27 00:17:59 -04:00
Jonathan Reem
e85ae48e16 Update server and client for changes in Headers mutability. 2014-09-27 00:17:58 -04:00
Sean McArthur
3259f7dce9 update to rust master
fixing usage of a Private trait as bounds for a public trait
2014-09-24 19:57:03 -07:00
Sean McArthur
1c472a220a adds HttpWriters 2014-09-18 12:17:53 -07:00
Sean McArthur
42e69e1f2e ssl for the client 2014-09-15 21:12:19 -07:00
Sean McArthur
c40b5b0c53 Request::with_stream to use a different NetWorkStream in Client
added benches for mocking out the tcp process
2014-09-11 08:26:03 -07:00
Jonathan Reem
4115c0e219 Moved WriteStatus, Fresh, and Streaming in to the net module. 2014-09-10 17:16:13 -07:00
Jonathan Reem
d5c6f33c34 Update the client API to statically track headers and move constructors
The client Request now uses the same system as a server Response to track
the write status of headers, and the API has been updated accordingly.

Additionally, the Request constructors have been moved onto the Request object
instead of being top-level hyper functions, as this better namespaces the
client and Server.
2014-09-10 17:04:49 -07:00
Jonathan Reem
2aabf1b8e6 Rename rfc7230 to http to more clearly indicate its purpose. 2014-09-09 17:37:01 -07:00
Jonathan Reem
ed491655dd Use dynamic dispatch for client Request and Response through Box<NetworkStream>
Also adds a convenience `abstract` method to NetworkStream for creating
Box<NetworkStream + Send> from a NetworkStream.
2014-09-09 17:06:27 -07:00
Sean McArthur
0285fc2acc Abstract out NetworkStream
This introduces a new Trait, NetworkStream, which abstracts over
the functionality provided by TcpStream so that it can be easily
mocked and extended in testing and hyper can be used for
other connection sources.
2014-09-09 14:55:14 -07:00
Jonathan Reem
f2c09c5743 Split common headers into a submodule and into their own files
This is a more extensible place to put them and doesn't clutter up
header/mod.rs as much as the old scheme did.

Fixes #8
2014-09-08 16:20:50 -07:00
Sean McArthur
1ceb468ec3 add issue numbers to todos 2014-09-03 10:55:21 -07:00
Sean McArthur
b4b539091f use Buffered Readers and Writers 2014-09-02 14:14:56 -07:00
Sean McArthur
818fac4128 add some benches with other http libs 2014-09-02 12:06:16 -07:00
Sean McArthur
c905111f8c implementation 2014-09-01 18:39:24 -07:00