Lorenzo Saino
10acc677aa
Make RoundTripper.RoundTrip(...) return if client timeout expires
...
Currently, the implementation of h2quic.RoundTripper.RoundTrip(req
*http.Request) ignores the context of req. As a result, if the
RoundTripper is used as transport of an http.Client with a timeout value
set, that is ignored.
For example, in the following snippet, client.Do(req) does not promptly
return if the task takes more than client.Timeout to complete.
client := http.Client{
Timeout: 50 * time.Millisecond,
Transport = &h2quic.RoundTripper{}
}
req, err := http.NewRequest("GET", "https://www.example.com ", nil)
response, err := client.Do(req)
This commit updates h2quic.client.RoundTrip(req *http.Request) to return
an error if the request is cancelled.
2018-02-25 20:58:37 +00:00
Marten Seemann
d0b22e3439
refactor stream to support canceling Read and Write
2017-12-16 09:10:24 +07:00
Lucas Clemente
ea4de9a08f
Merge pull request #698 from twdkeule/implement-closeNotifier
...
implement the context for the server http.Request
2017-09-26 14:09:54 +02:00
Marten Seemann
f1ada87dcf
make the protocol package internal
2017-08-30 00:19:44 +07:00
Thomas De Keulenaer
4f6eef8b08
Add test for request context
2017-08-27 20:05:13 +02:00
Thomas De Keulenaer
51be240488
Use datastream context for requests
2017-08-27 20:05:13 +02:00
Marten Seemann
8ef69143ba
implement a context for the stream
...
The context is cancelled when the write-side of the stream is closed.
2017-08-02 11:28:17 +07:00
Marten Seemann
e09993403d
add stream deadlines to the Stream interface
2017-07-15 23:46:15 +07:00
Marten Seemann
c122428cb6
simply the dialing in the h2quic client
...
Fixes #620 .
Dialing is now done lazily, when a request is executed.
2017-06-04 09:41:51 +02:00
Marten Seemann
c1d57d6efe
decode H2 HeadersFrame in h2quic responseWriter tests
...
fixes #455
2017-02-28 11:05:51 +07:00
Marten Seemann
a8bbe66d5c
use a better mockStream in h2quic tests
2017-01-14 18:58:40 +07:00
Marten Seemann
64bc80339e
reset streams that the request body is not read from
...
fixes #384
2017-01-09 23:47:01 +07:00
Marten Seemann
a86f31d789
implement a stream.Reset() method
...
ref #380
2017-01-09 09:49:44 +07:00
Marten Seemann
53d2290a59
only allow writing a response body for status codes that allow bodies
...
fixes #386
2017-01-07 09:49:22 +07:00
chestnutprog
02b50e2ffb
fix writing of multiple headers with the same name
2016-10-05 11:52:06 +02:00
Lucas Clemente
e856c08645
write http headers in lower case
...
fixes #317
2016-09-04 11:38:10 +02:00
Lucas Clemente
29df400cc1
correctly handle panicking http.Handler
...
fixes #290
2016-08-17 18:06:57 +02:00
Lucas Clemente
a4dcf5efd7
send 200 status for requests with empty http.Handlers
...
fixes #286
2016-08-16 12:31:07 +02:00
Lucas Clemente
4b2ab55435
fix a race when multiple requests were handled at the same time
...
fixes #157
2016-05-31 19:05:33 +02:00
Lucas Clemente
3dc50821d6
close the rcv-end of a h2 stream when the HEADERS has END_STREAM set
...
fixes #109
2016-05-18 13:33:36 +02:00
Lucas Clemente
b185ea04e1
add CloseRemote method to stream
...
ref #109
2016-05-18 13:33:36 +02:00
Lucas Clemente
9f63cdbd91
add stream.StreamID()
2016-05-14 13:35:43 +02:00
Lucas Clemente
d1272650c3
add support for http client uploads
...
fixes #27
2016-05-13 13:01:45 +02:00
Lucas Clemente
15c2c725a3
add tests for h2quic.responseWriter.Write
...
fixes #53
2016-05-04 17:11:38 +02:00
Lucas Clemente
0781e1b1b0
add h2quic package with response writer
2016-05-03 14:26:50 +02:00