aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules/caddyhttp/server.go
diff options
context:
space:
mode:
authorMarten Seemann <[email protected]>2024-03-22 02:56:10 +1000
committerGitHub <[email protected]>2024-03-21 10:56:10 -0600
commit32f7dd44aea270fa6c50bbf80acf5b831fc6ffcd (patch)
treef5e89d5432f23e3f20474696e575ed1d5438b4ea /modules/caddyhttp/server.go
parent63d597c09d542f4344416b821dc742ddb5fda68f (diff)
downloadcaddy-32f7dd44aea270fa6c50bbf80acf5b831fc6ffcd.tar.gz
caddy-32f7dd44aea270fa6c50bbf80acf5b831fc6ffcd.zip
chore: Update quic-go to v0.42.0 (#6176)
* update quic-go to v0.42.0 * use a rate limiter to control QUIC source address verification * Lint * remove deprecated ListenQUIC * remove number of requests tracking * increase the number of handshakes before source address verification is needed * remove references to request counters * remove deprecated listen* --------- Co-authored-by: Francis Lavoie <[email protected]> Co-authored-by: WeidiDeng <[email protected]>
Diffstat (limited to 'modules/caddyhttp/server.go')
-rw-r--r--modules/caddyhttp/server.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/modules/caddyhttp/server.go b/modules/caddyhttp/server.go
index 1ebfde61f..ea748bc12 100644
--- a/modules/caddyhttp/server.go
+++ b/modules/caddyhttp/server.go
@@ -27,7 +27,6 @@ import (
"runtime"
"strings"
"sync"
- "sync/atomic"
"time"
"github.com/caddyserver/certmagic"
@@ -43,8 +42,6 @@ import (
// Server describes an HTTP server.
type Server struct {
- activeRequests int64 // accessed atomically
-
// Socket addresses to which to bind listeners. Accepts
// [network addresses](/docs/conventions#network-addresses)
// that may include port ranges. Listener addresses must
@@ -274,10 +271,6 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// advertise HTTP/3, if enabled
if s.h3server != nil {
- // keep track of active requests for QUIC transport purposes
- atomic.AddInt64(&s.activeRequests, 1)
- defer atomic.AddInt64(&s.activeRequests, -1)
-
if r.ProtoMajor < 3 {
err := s.h3server.SetQuicHeaders(w.Header())
if err != nil {
@@ -567,7 +560,7 @@ func (s *Server) findLastRouteWithHostMatcher() int {
// the listener, with Server s as the handler.
func (s *Server) serveHTTP3(addr caddy.NetworkAddress, tlsCfg *tls.Config) error {
addr.Network = getHTTP3Network(addr.Network)
- h3ln, err := addr.ListenQUIC(s.ctx, 0, net.ListenConfig{}, tlsCfg, &s.activeRequests)
+ h3ln, err := addr.ListenQUIC(s.ctx, 0, net.ListenConfig{}, tlsCfg)
if err != nil {
return fmt.Errorf("starting HTTP/3 QUIC listener: %v", err)
}