Commit Graph

179 Commits

Author SHA1 Message Date
Marten Seemann
62b82789c0 http3: reduce usage of bytes.Buffer (#3539) 2022-09-01 06:39:21 -07:00
mojatter
dd521c0573 http3: fix listening on both QUIC and TCP (#3465) 2022-08-20 08:56:28 -07:00
Marten Seemann
498475fa60 update golangci-lint action to v3, golangci-lint to v1.48.0 (#3499)
* run gofmt -s -w

* stop using the deprecated io/ioutil package

* update golangci-lint action to v3, golangci-lint to v1.48.0
2022-08-10 09:50:48 -07:00
Marten Seemann
61ca8e89fe http3: ignore context after response when using DontCloseRequestStream (#3473) 2022-07-24 11:58:12 -07:00
Matt Robenolt
98b25879e5 dedupe Alt-Svc header values (#3461) 2022-06-28 00:58:44 -07:00
Marten Seemann
6fbc6d951a fix flaky HTTP/3 request body test (#3447) 2022-06-09 11:32:20 -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
619fa9fb44 Merge pull request #3432 from lucas-clemente/quicv2
implement QUIC v2
2022-06-09 15:52:40 +02:00
Marten Seemann
3eed9d1104 don't close the stream if it was hijacked 2022-06-09 10:51:23 +02:00
Marten Seemann
6fa7494c2f add a http3.HTTPStreamer, allowing users to take over the HTTP/3 stream 2022-06-09 10:51:23 +02:00
Marten Seemann
5fd6fa7cae remove the StreamID method on the HTTP/3 response writer 2022-06-09 10:51:23 +02: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
Marten Seemann
ccf897e519 remove the http3.DataStreamer (#3435) 2022-06-09 01:17:43 -07:00
Marten Seemann
9dfe9d5109 always reset header buffer, even when QPACK encoding fails (#3436) 2022-06-09 09:23:42 +02:00
Aaron Riekenberg
990b1fed38 Change "HTTP/3" to "HTTP/3.0". (#3439) 2022-06-02 10:33:06 -07:00
Marten Seemann
b5ef99a32c remove stray http3 connection file
This was accidentally commited in #3411.
2022-05-29 11:26:00 +02: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
5cb2e8265c fix handling of unknown frames in the stream hijacker 2022-05-27 17:35:00 +02:00
Marten Seemann
3088865952 add test for bidirectional stream hijacker (#3434)
Co-authored-by: hareku <hareku908@gmail.com>
2022-05-27 03:38:00 -07:00
Marten Seemann
c5ee49662d set the correct HTTP/3 ALPN for QUIC v2 2022-05-26 13:40:42 +02:00
Marten Seemann
de5f08171b introduce a http3.RoundTripOpt to prevent closing of request stream (#3411) 2022-05-20 02:54:31 -07:00
Marten Seemann
6511723c28 don't close the request stream when http3.DataStreamer was used (#3413) 2022-05-20 02:53:44 -07:00
Ivan Trubach
0ec8ee3cff do not embed http.Server in http3.Server (#3397)
This change removes the embedded http.Server struct from http3.Server.
It slightly changes some error behavior, in particular, it mandates
TLSConfig for methods that create QUIC listeners.

Before this change, only Addr, TLSConfig, Handler and MaxHeaderBytes
options were used from the http.Server. These are now defined directly
in http3.Server with an improved documentation.
2022-05-20 02:53:23 -07:00
Marten Seemann
5dedb7e12c fix parsing of request path for Extended CONNECT requests (#3388) 2022-04-25 04:20:58 -07:00
Marten Seemann
21eda36971 fix deadlock on concurrent http3.Server.Serve and Close calls (#3387) 2022-04-25 04:10:39 -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
6d4a694183 add LocalAddr and RemoteAddr functions to http3.StreamCreator (#3384) 2022-04-16 06:09:01 -07:00
Marten Seemann
ff6313fdb3 make the responseWriter hijackable 2022-04-03 14:28:15 +01:00
Marten Seemann
a983db0301 pass the connection to the client's StreamHijacker callback 2022-04-03 14:28:15 +01:00
Marten Seemann
448e8bcf05 add a stream ID getter function to the body 2022-04-03 14:28:15 +01:00
Marten Seemann
eddb2b819a add a stream ID getter function to the responseWriter 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
d1498c360e add support for serializing Extended CONNECT requests (#3360) 2022-04-02 11:55:42 -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
e71c236232 rename the Session to Connection 2022-03-27 11:27:23 +01:00
Marten Seemann
42f3159497 Merge pull request #3359 from lucas-clemente/http3-dial-context
respect the request context when dialing
2022-03-25 10:27:43 +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
Marten Seemann
0d5440a024 update HTTP/3 Datagram to draft-ietf-masque-h3-datagram-07 (#3355) 2022-03-25 01:44:12 -07:00
Marten Seemann
d065fb47e1 add support for the Extended CONNECT method (#3357)
Extended CONNECT is used by WebTransport.
2022-03-25 01:43:48 -07:00
Marten Seemann
85b495445e remove the SkipSchemeCheck RoundTripOpt (#3353)
This option was needed for an early draft version of MASQUE.
MASQUE now uses the https scheme.
2022-03-25 09:38:17 +01:00
Marten Seemann
3a102406ea remove parser logic for HTTP/3 DUPLICATE_PUSH frame (#3356)
This frame was removed in draft-25.
2022-03-25 09:37:56 +01:00
Artem Mikheev
d4293fb274 advertise multiple listeners via Alt-Svc and improve perf of SetQuicHeaders (#3352)
* feat: cache alt-svc headers and announce all listeners instead of just one

* feat: use Server.Addr for SetQuicHeaders if no port is available from listeners
2022-03-22 14:13:05 -07:00
Marten Seemann
4725ddebf3 avoid recursion when skipping unknown HTTP/3 frames (#3354) 2022-03-22 08:48:17 -07:00
Artem Mikheev
b7e93b54c9 Implement http3.Server.ServeListener (#3349)
* feat(http3): implement serving from quic.Listener

ServeListener method added to http3.Server allowing serving from an existing listener
ConfigureTLSConfig function added to http3 which should be used to create listeners meant for serving http3.

* docs(http3): add note about using ConfigureTLSConfig to ServeListener

* fix(http3): stop serving non-created listeners after Server.Close

* refactor(http3): return ErrServerClosed once server closes instead of context.Canceled

* feat(http3): close listeners from ServeListener as well

* fix(http3): fix logger not being setup during ServeListener

* test(http3): add unit tests for serving listeners

* test(http3): add tests for ConfigureTLSConfig

* test(http3): added server hotswapping integration test

* fix: race condition in listener tests
2022-03-21 02:20:29 -07:00