Marten Seemann
aee7706d5d
clean up dial functions
...
* add a context to all Dial functions
* remove the explicit Dial{*}Context functions
2023-05-01 13:59:54 +02:00
Marten Seemann
2b0a03a988
set the QUIC version for integration tests using a command line flag
2023-05-01 13:43:34 +02:00
Marten Seemann
1f57d4e789
protocol: remove VersionTLS, used during the gQUIC -> TLS 1.3 transition ( #3764 )
2023-04-19 07:24:34 -07:00
Jean-Francois Giorgi
af517bdef1
http3: make error codes public and consistent with http2 package ( #3744 )
...
* make http3 error codes public and consistent with http2 package
* typo on ErrNoError
* renaming of ErrCode values
2023-04-07 21:53:14 -07:00
Marten Seemann
a4b0265628
use a chan instead of a context in Connection.HandshakeComplete ( #3709 )
2023-03-26 06:51:56 -07:00
Marten Seemann
e0d4ffffef
http3: fix race condition when accessing the client's connection ( #3696 )
...
* http3: fix race condition when accessing the client's connection
* add an integration test for concurrent HTTP requests
---------
Co-authored-by: Bulat Khasanov <afti@yandex.ru >
2023-02-13 14:54:09 -08:00
Marten Seemann
89769f409f
http3: correctly handle closed clients ( #3684 )
...
* http3: use a mock roundTripCloser in tests
* http3: correctly handle failed clients
Specifically,
* immediately remove a client when a request errored
* if that error was an idle error, and the client was a reused client
(from an earlier request that already completed the handshake),
re-dial the connection
2023-01-28 00:49:52 -08:00
Avi Rosenberg
7b2c69451e
http3: change status codes to const ( #3683 )
...
Signed-off-by: Avi Rosenberg <avrumi96@gmail.com >
2023-01-27 14:40:59 -08:00
Marten Seemann
58cedf7a4f
rename module, adjust import paths to quic-go/quic-go ( #3680 )
2023-01-21 19:53:57 -08:00
Marten Seemann
9488539a49
update imports to use qtls and qpack from quic-go GitHub organization ( #3676 )
2023-01-20 13:42:54 -08:00
David Brouwer
047f9b6ffa
http3: add request to response ( #3608 )
2022-11-02 13:39:34 -07:00
Marten Seemann
424a66389c
http3: fix double close of chan when using DontCloseRequestStream ( #3561 )
2022-09-23 03:10:25 -07:00
Marten Seemann
62b82789c0
http3: reduce usage of bytes.Buffer ( #3539 )
2022-09-01 06:39:21 -07:00
Marten Seemann
61ca8e89fe
http3: ignore context after response when using DontCloseRequestStream ( #3473 )
2022-07-24 11:58:12 -07:00
Nuno Diegues
4c96cf75bf
make the keep alive interval configurable ( #3444 )
...
* Make keep alive configurable
* Fix unit tests
2022-06-09 08:31:37 -07:00
Marten Seemann
04d46526c7
refactor HTTP/3 stream handling to use a dedicated stream
...
Reading from and writing onto this stream applies HTTP/3 DATA framing.
2022-06-09 10:51:23 +02:00
Aaron Riekenberg
990b1fed38
Change "HTTP/3" to "HTTP/3.0". ( #3439 )
2022-06-02 10:33:06 -07:00
Marten Seemann
96c0daceca
pass frame / stream type parsing errors to the hijacker callbacks
...
When a stream is reset, we might not have received the frame / stream
type yet. The callback might be able to identify if it was a stream
intended for that application by analyzing the stream reset error.
2022-05-27 17:53:54 +02:00
Marten Seemann
de5f08171b
introduce a http3.RoundTripOpt to prevent closing of request stream ( #3411 )
2022-05-20 02:54:31 -07:00
hareku
1a0d577854
implement HTTP/3 unidirectional stream hijacking ( #3389 )
...
* implement HTTP/3 unistream hijacking
* Apply suggestions from code review
Fixed name consistency.
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
* rename unistream to unidirectional stream
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
2022-04-21 09:51:18 -07:00
Marten Seemann
a983db0301
pass the connection to the client's StreamHijacker callback
2022-04-03 14:28:15 +01:00
Marten Seemann
9c8cdeda57
allow HTTP clients to set the number of incoming streams in quic.Config
2022-04-03 14:28:15 +01:00
Marten Seemann
48a2cce9df
implement HTTP/3 stream hijacking
2022-04-03 14:28:15 +01:00
Marten Seemann
a54816867f
make it possible to set settings unknown to the http3 package
2022-04-03 14:28:15 +01:00
Marten Seemann
57461e01b5
add a http3.Hijacker that allows stream creation on a QUIC session from a http.Response.Body
2022-04-03 14:28:15 +01:00
Marten Seemann
332473668a
remove unneeded network from custom dial function used in HTTP/3 ( #3368 )
2022-04-03 06:27:55 -07:00
Marten Seemann
f68b38635a
rename occurrences of session in HTTP/3 server and client
2022-03-27 11:27:25 +01:00
Marten Seemann
6aaa9a817c
rename the EarlySession to EarlyConnection
2022-03-27 11:27:25 +01:00
Marten Seemann
d3fab2a230
also the context when dialing an address
2022-03-25 10:11:55 +01:00
Marten Seemann
137491916b
respect the request context when dialing
2022-03-25 09:47:05 +01:00
Randy Reddig
346bd63a60
quicvarint: add Reader and Writer interfaces ( #3233 )
2021-08-05 10:49:17 -07:00
Marten Seemann
90727cb41a
introduce a quic.StreamError type and use it for stream cancelations
2021-05-01 09:39:52 +07:00
Marten Seemann
42b61729bd
expose the TransportError and the ApplicationError
2021-05-01 09:38:49 +07:00
Marten Seemann
29f02e1bda
set the Content-Length for HTTP/3 responses
2021-03-15 13:09:09 +08:00
Marten Seemann
6f32d2df1d
don't reset the QPACK encoder / decoder streams
...
We don't need these streams, since our QPACK implementation doesn't use the
dynamic table yet. However, we MUST NOT close / reset these streams. Instead,
just ignore them.
2021-03-04 11:14:00 +08:00
Marten Seemann
f9226887b4
rename ReadVarint / WriteVarInt / VarIntLen to Read / Write / Len
2021-01-02 00:15:07 +08:00
Marten Seemann
11c5045065
move varint encoding / decoding to a separate package
...
... which is not internal.
2021-01-01 11:46:45 +08:00
Marten Seemann
b47fe87e51
Merge pull request #2952 from lucas-clemente/reset-h3-uni-stream-when-type-unknown
...
cancel reading on unidirectional streams when the stream type is unknown
2020-12-29 07:42:24 +07:00
Marten Seemann
7e4ac36b2f
remove duplicate check of the URL scheme in the HTTP/3 client
...
There's already a check like this performed in the http3.RoundTripper.
2020-12-25 13:15:53 +07:00
Marten Seemann
b753005137
check that QUIC layer negotiated datagram support when handing SETTINGS
2020-12-23 15:06:04 +07:00
Marten Seemann
3cb07d8f00
add a http3.RoundTripper.EnableDatagram option
2020-12-23 15:06:04 +07:00
Marten Seemann
160c11bd34
cancel reading on unidirectional streams when the stream type is unknown
...
Otherwise the stream would remain open indefinitely.
2020-12-23 15:00:01 +07:00
Marten Seemann
808671e2d4
accept the control stream and parse SETTINGS frame, for the H3 client
2020-12-23 14:49:41 +07:00
Marten Seemann
356c69944e
return a quic.ConnectionState from Session.ConnectionState()
2020-12-09 15:31:23 +07:00
Marten Seemann
898f484d0a
only allow the HTTP/3 client to dial with a single QUIC version
2020-11-02 11:29:42 +07:00
Marten Seemann
30c91149c2
fill out the http.Response.TLS field
2020-11-02 11:29:42 +07:00
Marten Seemann
c968b18a21
select the H3 ALPN based on the QUIC version in use (for the H3 server)
2020-10-29 13:44:23 +07:00
Marten Seemann
8752576f26
run gofumpt, enable the gofumpt linter
2020-10-26 09:33:35 +07:00
Lorenzo Saino
8db2288382
Make http3.client.Close() succeed if session was not started
...
Invoking http3.client.Close() before client.dial() is invoked
causes a segmentation fault. That occurs because, in this
circumstance, invoking client.Close() results in invoking
client.session.CloseWithError(...) while client.session is nil.
This commit changes the behavior of
http3.client.Close() to return nil if client.session
is nil and adds an associated test case.
2020-02-23 00:21:19 +00:00
Marten Seemann
91543322f6
define a new Method for 0-RTT GET requests on the http.Request
2020-01-29 11:34:06 +07:00