From 02b8640e4450dc1a76fd1b9bd9920efc09a8d596 Mon Sep 17 00:00:00 2001 From: WeidiDeng Date: Thu, 17 Oct 2024 15:53:26 +0800 Subject: [PATCH] set status for the error response --- modules/caddyhttp/reverseproxy/fastcgi/client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/caddyhttp/reverseproxy/fastcgi/client.go b/modules/caddyhttp/reverseproxy/fastcgi/client.go index 43c76a7f..18c9d0ba 100644 --- a/modules/caddyhttp/reverseproxy/fastcgi/client.go +++ b/modules/caddyhttp/reverseproxy/fastcgi/client.go @@ -209,6 +209,7 @@ func newErrorResponse(status int) *http.Response { statusText := http.StatusText(status) resp := &http.Response{ Status: statusText, + StatusCode: status, Header: make(http.Header), Body: io.NopCloser(strings.NewReader(statusText)), ContentLength: int64(len(statusText)),