Commit graph

255 commits

Author SHA1 Message Date
Gaukas Wang
4973374ea5
sync: quic-go 0.42.0
Signed-off-by: Gaukas Wang <i@gaukas.wang>
2024-04-23 22:34:55 -06:00
Gaukas Wang
77691ccce8
fix: error after sync 2023-10-26 22:48:59 -06:00
Gaukas Wang
7c77243b04
upstream: sync to 0.39.1 2023-10-26 22:47:22 -06:00
Marten Seemann
9a397abc17
update gomock to v0.3.0 (#4087) 2023-09-24 04:38:28 -07:00
Marten Seemann
d8cc4cb3ef
http3: introduce an HTTP/3 error type (#4039)
* http3: introduce an HTTP/3 error type

* http3: use a pointer receiver for the Error
2023-09-16 04:57:50 -07:00
Gaukas Wang
856bc02b8f
Merge branch 'upstream' into sync-upstream 2023-08-28 14:12:03 -06:00
Marten Seemann
2797f85fc0
switch from unmaintained golang/mock to go.uber.org/mock (#4050) 2023-08-28 02:23:55 -07: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
4065c5b85e
Merge pull request #1 from gaukas/uquic-dev
new: uQUIC
2023-08-02 16:11:09 -06:00
Gaukas Wang
ea40752ca3
new: uquic 2023-08-02 15:38:16 -06:00
Gaukas Wang
a9a033da78
Merge branch 'quic-go:master' into uquic 2023-08-01 20:58:24 -06:00
Gaukas Wang
fca46117e4
impl: uquic with utls 2023-07-29 23:45:16 -06:00
roc
32f8b20ae5
http3: fix check for content length of the response (#3998)
* fix: check response content-length other than request content-length

* Update http3/client.go

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-07-28 21:18:26 -07:00
WeidiDeng
2c0e7e02b0
http3: panic in ResponseWriter.WriteHeader for invalid status codes (#3984)
* response writer: panic for invalid status code

* add tests

* readd imports

* readd imports

* fix imports
2023-07-21 09:50:51 -07:00
WeidiDeng
2183283622
http3: discard negative content-length header when writing response (#3983)
* response writer: discard negative content-length header

* shorten comment

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-07-20 11:42:37 -07: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
Marten Seemann
5ae28928db
http3: reject unknown pseudo headers (#3973) 2023-07-18 22:42:26 -07:00
Marten Seemann
b6dbfc8c06
http3: reject responses that don't set the :status header (#3975) 2023-07-18 22:26:46 -07:00
Marten Seemann
5d59c3059f
http3: deduplicate Content-Length headers (#3972) 2023-07-18 21:52:21 -07:00
Marten Seemann
bb296b8c17
http3: unify handling of request and response headers (#3969) 2023-07-18 21:39:05 -07:00
Marten Seemann
ad16aa765d
http3: refactor header field processing into a separate function (#3971) 2023-07-18 21:16:50 -07:00
Marten Seemann
514df55288
http3: enforce ordering requirement between pseudo and regular headers (#3968)
* http3: enforce ordering requirement between pseudo and regular headers

* simplify logic
2023-07-18 09:13:16 -07:00
Marten Seemann
ab192a084d
http3: reject negative values for the Content-Length header (#3966) 2023-07-17 19:23:54 -07:00
Marten Seemann
c4b3d979bd
http3: reject header field values with invalid characters (#3967) 2023-07-17 18:56:29 -07:00
Marten Seemann
baee8184fc
http3: reject header field names with invalid characters (#3965) 2023-07-17 18:33:24 -07:00
Marten Seemann
3edacebff0
http3: reject header field that contain non-lowercase characters (#3964) 2023-07-17 18:16:01 -07:00
Marten Seemann
8ac22a9483
http3: set the Content-Length header in the http.Request.Header map (#3963) 2023-07-16 19:26:15 -07:00
Marten Seemann
3dea8f8a9b
http3: don't send more than http.Request.ContentLength bytes (#3960) 2023-07-16 19:16:52 -07:00
WeidiDeng
de8d7a32b8
http3: return http.ErrContentLength when writing too large response (#3953) 2023-07-12 23:20:35 -07:00
WeidiDeng
9e7fa4773a
http3: implement FlushError for the response writer (#3951)
* implement FlushError interface for http3 response writer

* move where to log flush error
2023-07-12 20:40:53 -07:00
WeidiDeng
2c4371b6a9
http3: add Date response header if not set (#3952)
* automatically add date header if not already set

* improve comment for Date header

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-07-12 10:30:33 -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
fcf8d4b3ff
http3: validate Host header before sending (#3948) 2023-07-11 23:27:24 -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
Glonee
9237dbb167
http3: close the connection when closing the roundtripper (#3873) 2023-06-01 01:06:13 -07:00
Glonee
c96fbd2e4a
http3: correctly use the quic.Transport (#3869)
* use quic.Transport in http3

* add intergrationtests to dial server with different server names

* update test
2023-05-31 23:31:20 -07:00
Glonee
21549fcb4a
http3: set tls.Config.ServerName for outgoing requests, if unset (#3867)
* fix #3865

* add test case

* Update http3/client, client_test.go

Co-authored-by: Marten Seemann <martenseemann@gmail.com>

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-05-31 22:45:56 -07:00
Glonee
cec79d338c
implement http3.RoundTripper.CloseIdleConnections (#3820)
* implement CloseIdleConnections

* nit

Co-authored-by: Marten Seemann <martenseemann@gmail.com>

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-05-15 00:12:00 -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
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
d683b841c4 remove the host parameter from all dial 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
Kévin Dunglas
172123c340
http3: add compatibility with net/http.ResponseController (#3790)
* feat: compatibility with "net/http".ResponseController

* better deadline tests

* don't run deadline tests on Go 1.19

* skip deadline tests on Go 1.19
2023-05-01 04:40:33 -07:00