Marten Seemann
fc4adb4775
improve error handling in the h2quic client for header stream handling
...
When the underlying QUIC stream is closed, the close error should be
returned. This always happens when receiving a CONNECTION_CLOSE from the
server.
Furthermore, this adds a missing break statement in the case when
receiving an invalid HTTP request.
2018-01-03 09:07:18 +07:00
Marten Seemann
a1058c0d97
make h2quic.Server.ListenAndServe error if it was closed before
2017-12-20 17:26:32 +07:00
Marten Seemann
d0b22e3439
refactor stream to support canceling Read and Write
2017-12-16 09:10:24 +07:00
Julien Schmidt
feab6e8450
shorten blocking call of Server.handleRequest
2017-12-08 09:41:57 +01:00
Marten Seemann
ff17ef79fe
Merge pull request #987 from julienschmidt/handleHeaderStream
...
remove superfluous goroutine
2017-12-06 17:21:12 +07:00
Julien Schmidt
06c87af606
remove unused encryptionLevel from client
2017-12-06 10:51:28 +01:00
Julien Schmidt
54b62fb4a5
remove superfluous goroutine
2017-12-06 10:44:37 +01:00
Marten Seemann
f662822486
use stream 0 for the crypto stream when using TLS
2017-11-04 15:22:07 +07:00
Marten Seemann
d98a11bb35
save version numbers such that can be written in big endian
...
This makes the version number representation consistent with the IETF
draft.
2017-10-27 17:24:24 +07:00
Marten Seemann
9cb7480050
rename connection ID truncation to connection ID omission
2017-09-29 22:52:54 +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
Julien Benoist
ce9132e324
fix TLS initialization for the TCP h2quic Server
2017-09-22 20:25:52 +07: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
Thomas De Keulenaer
55a8979bd5
Added session context to http.Request
2017-08-27 20:05:13 +02:00
Lucas Clemente
75070d057b
Fix import order
2017-08-21 12:25:27 +02:00
Lucas Clemente
8ec11c0b53
Move testdata/ to internal/
2017-08-18 12:06:36 +02:00
Marten Seemann
f6e8ce5c67
make tests independent of the supported QUIC versions
...
Now it's no longer necessary to edit the h2quic tests when adding a new
QUIC version to the slice of supported versions.
2017-08-10 20:23:20 +07: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
e02f5d5fbe
replace Session.WaitUntilClosed() by a context
2017-08-02 11:27:44 +07:00
Marten Seemann
43279c37a8
Merge pull request #753 from lucas-clemente/fix-734
...
implement a h2quic.RoundTripOpt that allow to only use cached QUIC conns
2017-07-25 08:36:51 +07:00
Marten Seemann
6bd6594003
implement a h2quic.RoundTripOpt that allow to only use cached QUIC conns
2017-07-24 21:46:18 +07:00
Marten Seemann
36ee4bd36b
Revert "use a finalizer to close the h2quic.RoundTripper"
...
This reverts commit 65cea185bd .
The finalizer may run even before the h2quic.RoundTripper
variable falls out of scope. This can result in closing
the session before a HTTP transfer has completed.
2017-07-24 21:43:52 +07:00
Justin
0c3a466805
Remove Alternate-Protocol header
2017-07-17 22:20:40 -04:00
Justin
33bb42488a
Remove Alternate-Protocol header
2017-07-17 22:20:34 -04:00
Marten Seemann
e09993403d
add stream deadlines to the Stream interface
2017-07-15 23:46:15 +07:00
Marten Seemann
65cea185bd
use a finalizer to close the h2quic.RoundTripper
...
The finalizer is executed when the RoundTripper is garbage collected.
This is not a perfect solution, since there are situations when an
unneeded RoundTripper is not garbage collected, e.g. when the program
exits before the GC ran. In those cases, the server will run into the
idle timeout and eventually close the connection on its side.
2017-07-12 19:20:21 +07:00
Marten Seemann
bf6030a855
implement a function to close the h2quic.RoundTripper
...
h2quic.RoundTripper.Close() closes all QUIC connections that this
roundtripper has used.
2017-07-12 18:56:47 +07:00
Marten Seemann
ee6ca8dfb4
expose the quic.Config in the h2quic.RoundTripper
2017-07-10 22:00:03 +07:00
Marten Seemann
abb9594af8
change order of function parameters for the h2quic.client constructor
2017-07-10 22:00:03 +07:00
Marten Seemann
cb81a95ceb
make the dependency-injected dialAddr in h2quic.client a global variable
...
It's only used for testing, so there's no need to have in each
h2quic.client instance.
2017-07-10 21:59:58 +07:00
Marten Seemann
d94b57fe29
expose the quic.Config in the h2quic.Server
2017-07-10 21:57:31 +07:00
Marten Seemann
79c7ed4ed1
dependency-inject quic.Listen and quic.ListenAddr in h2quic.Server
2017-07-10 21:57:31 +07:00
Lucas Clemente
bbf8977f64
Change h2quic.Server.Serve() to accept a net.PacketConn
2017-07-05 21:02:13 +02:00
krish7919 (Krish)
755dedf1ff
Add keepalive support for clients in quic.Config
...
Fixes #525 .
2017-07-05 20:29:28 +02:00
Marten Seemann
649933d17b
Merge pull request #713 from lucas-clemente/remove-tlsconfig-from-quicconfig
...
remove the tls.Config from the quic.Config
2017-07-03 22:45:13 +02:00
Marten Seemann
a851aaacda
remove the tls.Config from the quic.Config
...
The tls.Config now is a separate parameter to all Listen and Dial
functions in the quic package.
2017-07-03 22:12:09 +02:00
Lucas Clemente
5c28e8d164
Fix cookie test for Go1.9
2017-07-03 13:57:11 +02:00
Marten Seemann
9df3380bc6
rename the h2quic.QuicRoundTripper to h2quic.RoundTripper
2017-06-26 19:14:41 +02:00
Marten Seemann
cd02cc8f0f
add a method to the session that blocks until it is closed
2017-06-16 11:13:40 +02:00
Marten Seemann
987905149b
run gofmt to fix ordering of imports
2017-06-13 18:07:22 +02:00
Marten Seemann
c0b09c8646
make utils an internal package
2017-06-09 22:28:40 +02:00
Marten Seemann
05d7bc91ef
fix race condition when handling the header stream fails in h2quic client
2017-06-06 17:08:00 +02: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
c2a89e6b78
improve error message in the h2quic client
2017-06-03 17:41:17 +02:00
Marten Seemann
9054e5205f
don't pass the roundtripper to the h2quic client
2017-06-02 23:08:14 +02:00
Marten Seemann
4c3d4960bb
privatize the h2quic client
2017-06-01 20:14:07 +02:00
Marten Seemann
6623abf3d1
return handshake errors in h2quic Client.Do
2017-05-16 00:56:10 +08:00
Marten Seemann
33a9b5aae4
add more tests for Dial in the h2quic client
2017-05-16 00:56:09 +08:00