improved HTTP performance, especially when match_domains are used; api json string fix

This commit is contained in:
yusing
2024-11-02 07:14:03 +08:00
parent 46b4090629
commit 625bf4dfdc
4 changed files with 48 additions and 34 deletions

View File

@@ -404,7 +404,7 @@ func (p *ReverseProxy) serveHTTP(rw http.ResponseWriter, req *http.Request) {
rw.WriteHeader(res.StatusCode)
err = U.Copy2(req.Context(), rw, res.Body)
_, err = io.Copy(rw, res.Body)
if err != nil {
if !errors.Is(err, context.Canceled) {
p.errorHandler(rw, req, err, true)