请求源站错误时增加503、504错误

This commit is contained in:
GoEdgeLab
2021-09-01 08:48:03 +08:00
parent 4c15103717
commit 7b4d9d8cc0
8 changed files with 35 additions and 42 deletions

View File

@@ -36,7 +36,7 @@ func (this *HTTPRequest) doURL(method string, url string, host string, statusCod
resp, err := client.Do(req)
if err != nil {
logs.Error(errors.New(req.URL.String() + ": " + err.Error()))
this.write500(err)
this.write50x(err, http.StatusInternalServerError)
return
}
defer func() {