Skip to content

Commit

Permalink
fix import cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
WeidiDeng committed Jan 2, 2025
1 parent b71a90f commit e0aa528
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules/caddyhttp/reverseproxy/reverseproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi"
"io"
"net"
"net/http"
Expand Down Expand Up @@ -246,7 +245,7 @@ func (h *Handler) Provision(ctx caddy.Context) error {
h.Transport = mod.(http.RoundTripper)
// enable request buffering for fastcgi if not configured
// TODO: better default buffering for fastcgi requests without content length
if _, ok := h.Transport.(*fastcgi.Transport); ok && h.RequestBuffers == 0 {
if module, ok := h.Transport.(caddy.Module); ok && module.CaddyModule().ID.Name() == "fastcgi" && h.RequestBuffers == 0 {
h.RequestBuffers = 4096
}
}
Expand Down

0 comments on commit e0aa528

Please sign in to comment.