Commit Graph

2521 Commits

Author SHA1 Message Date
Sean McArthur
fcf2863c0f Merge pull request #14 from reem/string-headers
Key Headers HashMap with SendStr instead of &'static str
2014-09-07 20:01:39 -07:00
Jonathan Reem
f9565a9dec Key Headers HashMap with SendStr instead of &'static str
This fixes an unsafe transmute that could cause use-after-frees
on collision resolution in the headers hash and avoids allocating
for cases where it is not necessary.

Fixes #12
2014-09-07 17:40:18 -07:00
Sean McArthur
2ac1305b18 Merge pull request #13 from reem/handler-iterator
Change the Handler trait to receive an Iterator of (Request, Response) pairs.
2014-09-07 10:49:25 -07:00
Sean McArthur
310789a73b Merge pull request #16 from reem/expose-raw-header
Add a get_raw method, which allows users to access the raw value of a header
2014-09-07 09:40:11 -07:00
Sean McArthur
0758cf14ad Merge pull request #15 from reem/use-outside-unsafe-any-trait
Use an out-of-tree unsafe-any trait instead of a home-grown version.
2014-09-07 09:30:52 -07:00
Jonathan Reem
d3bca27e8a Add a get_raw method, which allows users to access the raw value of a header
This method is marked unsafe, as it should not be used in normal code
because it can easily invalidate header representations.

Fixes #10
2014-09-07 09:57:55 +02:00
Jonathan Reem
5f24bcecd4 Use an out-of-tree unsafe-any trait instead of a home-grown version.
This has the advantage of being separately checked, tested
and documented.
2014-09-07 09:49:10 +02:00
Jonathan Reem
3fbf3040cd Updated example for new Handler trait
This introduces a bit of complexity to the example,
mainly the use of the try_continue! macro for dealing
with errors, but I think this is an appropriate trade-off
as users of this library are likely to be framework authors
instead of end users.
2014-09-07 09:37:53 +02:00
Jonathan Reem
c760ed063e Change the Handler trait to receive an Iterator of (Request, Response) pairs.
This allows downstream users to have total control of their concurrency
strategy, while also exposing a very nice, streaming interface for frameworks
to build on.

This also resolves issues surrounding the use of IoResult as the return type
of Handler::handle, because handlers now have complete control over how to
handle internal failure.

Fixes #3
Fixes #4
2014-09-07 09:18:20 +02:00
Sean McArthur
4d77477c83 add Date header 2014-09-03 14:14:44 -07:00
Sean McArthur
e2e93c5d5f add + 'static bounds to Header trait 2014-09-03 11:12:04 -07:00
Sean McArthur
592438b630 change headers to use static strs 2014-09-03 11:05:48 -07:00
Sean McArthur
307311f745 consume Server upon listen 2014-09-03 10:56:15 -07:00
Sean McArthur
1ceb468ec3 add issue numbers to todos 2014-09-03 10:55:21 -07:00
Sean McArthur
055a783ef0 adding a custom header to benches 2014-09-02 20:52:29 -07:00
Sean McArthur
7e223932f4 add docs link to readme 2014-09-02 20:51:57 -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
8938726ed1 adding explicit bounds 2014-09-01 18:51:12 -07:00
Sean McArthur
c905111f8c implementation 2014-09-01 18:39:24 -07:00
Sean McArthur
8865516816 init 2014-08-30 14:18:28 -07:00