Commit graph

114 commits

Author SHA1 Message Date
Gaukas Wang
856bc02b8f
Merge branch 'upstream' into sync-upstream 2023-08-28 14:12:03 -06:00
WeidiDeng
824fd8a2f2
http3: automatically add content-length for small responses (#3989)
* response writer: add content-length automatically when response is small enough and doesn't call Flush

* fix comment

* add integration test

* Update http3/response_writer.go

* Update integrationtests/self/http_test.go

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-08-20 20:31:22 -07:00
Marten Seemann
70f3f44a09
http3: remove leftover ALPN constant for draft-29 (#4027) 2023-08-13 19:36:01 -07:00
Ondrej Kokes
05db808f72
http3: change code point for HTTP datagrams to RFC 9297 (#3588)
* HTTP/3 Datagrams are now RFC 9297

* Use datatracker htmlized docs rather than rfc-editor (to be consistent)
2023-08-09 06:30:46 -07:00
Gaukas Wang
95575f5fe7
break: update repo url [ci skip]
uTLS is not yet bumped to the new version, so this commit breaks the dependencies relationship by getting rid of the local replace.
2023-08-03 18:58:52 -06:00
Gaukas Wang
fca46117e4
impl: uquic with utls 2023-07-29 23:45:16 -06:00
Marten Seemann
5a22ac8970
http3: enforce that DATA frames don't exceed Content-Length (#3980) 2023-07-20 09:47:01 -07:00
Marten Seemann
ae8bdd79e0
http3: use correct error code when request header parsing fails (#3979) 2023-07-19 11:46:10 -07:00
WeidiDeng
f97c9bf88c
http3: don't write response headers if the handler panicked (#3950) 2023-07-12 09:32:33 -07:00
Marten Seemann
3d89e545d3
use the new crypto/tls QUIC Transport (#3860) 2023-07-01 11:15:00 -07:00
Marten Seemann
21388c86bb
drop support for draft-29 (#3903) 2023-06-21 04:06:44 -07:00
Jean-Francois Giorgi
9acce3c6d9
http3: return http.ErrServerClosed instead of quic.ErrServerClosed (#3900)
* - fix 3898

* fix gofumpt

* - refactoring: inline  serveListener in ServeListener
- use ServeListener in s.serveConn
- updated doc for the returned error

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-06-20 09:32:56 -07:00
Marten Seemann
7a0ef5f867 make Config.Allow0RTT a bool, not a callback 2023-05-02 15:56:49 +02:00
Marten Seemann
86a1234c87 make EarlyListener a struct, not an interface 2023-05-01 14:41:16 +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
41ddaa0262
attach the QUIC version to context returned by ClientHelloInfo.Context (#3721) 2023-03-26 22:26:14 +09: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
mstmdev
bbeea8dca0
http3: use HTTP/2 as the default protocol in ListenAndServe (#3673) 2023-01-23 17:48:35 -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
Marten Seemann
45b489b6f6 make ConnectionState usable during the handshake 2023-01-05 16:37:07 +13:00
Marten Seemann
2b5d1281c1
http3: add http3.Server.ServeQUICConn to serve a single QUIC connection (#3587) 2022-10-11 05:07:24 -07:00
Marten Seemann
c75bf49422
http3: expose ALPN values (#3580) 2022-10-11 04:27:49 -07:00
shade34321
a905648480
http3: handle ErrAbortHandler when the handler panics (#3575)
* Handle abort like the stdlib does

* Using the sentinel value from the stdlib instead of redefining.

* we return before logging out

* Added test to hand abort handler

* Added in two tests but apparently only saved the first one.

* remove one test case because it wasn't needed
2022-10-09 07:50:04 -07:00
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
Matt Robenolt
98b25879e5
dedupe Alt-Svc header values (#3461) 2022-06-28 00:58:44 -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
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
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
c5ee49662d set the correct HTTP/3 ALPN for QUIC v2 2022-05-26 13:40:42 +02: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
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
ff6313fdb3 make the responseWriter hijackable 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
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
0d5440a024
update HTTP/3 Datagram to draft-ietf-masque-h3-datagram-07 (#3355) 2022-03-25 01:44:12 -07: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
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
市川恭佑 (ebi)
59958e5282
fix typo *connections (#3309) 2022-01-01 23:10:01 -08:00