Commit Graph

146 Commits

Author SHA1 Message Date
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
市川恭佑 (ebi)
59958e5282 fix typo *connections (#3309) 2022-01-01 23:10:01 -08:00
Aaron Riekenberg
afbe993b4c Add test setting http3.Server.Port. 2021-09-19 15:51:09 -05:00
Aaron Riekenberg
43ee0c6757 Export http3.Server.Port. 2021-09-18 10:29:37 -05:00
Aaron Riekenberg
8b56e7d2b5 Revert "Allow use of custom port value in Alt-Svc header."
This reverts commit ce8167c3cf.
2021-09-18 10:22:57 -05:00
Aaron Riekenberg
ce8167c3cf Allow use of custom port value in Alt-Svc header. 2021-09-11 10:43:37 -05:00
Randy Reddig
346bd63a60 quicvarint: add Reader and Writer interfaces (#3233) 2021-08-05 10:49:17 -07:00
Marten Seemann
f51cc93770 drop support for QUIC draft version 32 and 34 2021-07-06 09:50:10 -07:00
folbrich
ea33fc95df Update doc for dialer in http3.RoundTripper 2021-06-20 08:47:18 -06:00
Marten Seemann
68da2c4468 add support for QUIC v1, RFC 9000 2021-05-29 11:56:14 -07:00
Marten Seemann
6b771df453 add support for QUIC v1 2021-05-01 10:05:29 +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
b8358dc2bb Merge pull request #3063 from lucas-clemente/dont-reset-qpack-streams
don't reset the QPACK encoder / decoder streams
2021-03-08 18:08:02 +08:00
Kévin Dunglas
3b916f2e80 allow sending 1xx responses (#3047)
Currently, it's not possible to send informational responses such as 103 Early Hints or 102 Processing.

This patch allows calling WriteHeader() multiple times in order to send informational responses before the final one.
It follows the patch for HTTP/1 (golang/go#42597) and HTTP/2 (golang/net#96).

In conformance with RFC 8297, if the status code is 103 the current content of the header map is also sent. Its content is not removed after the call to WriteHeader() because the headers must also be included in the final response.

The Chrome and Fastly teams are starting a large-scale experiment to measure the real-life impact of the 103 status code.
Using Early Hints is proposed as a (partial) alternative to Server Push, which are going to be removed from Chrome: https://groups.google.com/a/chromium.org/g/blink-dev/c/K3rYLvmQUBY/m/21anpFhxAQAJ

Being able to send this status code from servers implemented using Go would help to see if implementing it in browsers is worth it.
2021-03-05 10:03:31 +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
615540f8d5 use the correct HTTP/3 ALPN when using draft-34 2021-02-11 09:46:00 +08:00
Marten Seemann
e4dab7fb37 reenable key updates for HTTP/3
Chrome was recently updated to v88, which is able to handle key updates
correctly.
2021-01-20 14:51:42 +08:00
Marten Seemann
35939b25a9 allow access to the underlying quic.Stream from a http.ResponseWriter 2021-01-17 14:35:21 +08:00
Marten Seemann
4653549266 fix outdated comment for the http3.Server 2021-01-05 11:21:44 +08:00
Marten Seemann
d9c7467b56 Merge pull request #2973 from lucas-clemente/publicize-varint
publicize QUIC varint reading and writing
2021-01-02 12:05:53 +08:00
Marten Seemann
5e7fb50223 Merge pull request #2962 from lucas-clemente/skip-scheme-check
add a http3.RoundTripOpt to skip the request scheme check
2021-01-02 12:05:19 +08:00
Marten Seemann
c78634df38 add a http3.RoundTripOpt to skip the request scheme check
Otherwise, we'll only be able to issue https requests. This is what we
usually want, but for MASQUE support, the URL will be of the form
masque://example.org.
2021-01-02 10:21:18 +08:00
Marten Seemann
f9226887b4 rename ReadVarint / WriteVarInt / VarIntLen to Read / Write / Len 2021-01-02 00:15:07 +08:00
Marten Seemann
428bf488d1 remove stray TODO in the http3.Server 2021-01-01 12:50:21 +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
0b0cb7c06f add a http3.Server.EnableDatagram option 2020-12-23 15:06:04 +07:00
Marten Seemann
aaf1d381d3 implement parsing and writing of the H3_DATAGRAM setting 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