diff --git a/middleware/fastcgi/fcgiclient.go b/middleware/fastcgi/fcgiclient.go index 44b649e6..b657a3b3 100644 --- a/middleware/fastcgi/fcgiclient.go +++ b/middleware/fastcgi/fcgiclient.go @@ -380,7 +380,10 @@ func (c *FCGIClient) Request(p map[string]string, req io.Reader) (resp *http.Res if err != nil { return } - resp.Status = statusParts[1] + if len(statusParts) > 1 { + resp.Status = statusParts[1] + } + } else { resp.StatusCode = http.StatusOK }