remove some http hard code (#2047)

Co-authored-by: yonbiaoxiao <yonbiaoxiao@tencent.com>
This commit is contained in:
xyb
2020-10-18 12:58:38 +08:00
committed by GitHub
parent 07b32ad3b9
commit 2e45567e56
6 changed files with 12 additions and 11 deletions

View File

@@ -28,7 +28,7 @@ type httpHandler struct {
func (h *httpHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
service, err := h.getService(r)
if err != nil {
w.WriteHeader(500)
w.WriteHeader(http.StatusInternalServerError)
return
}
@@ -39,7 +39,7 @@ func (h *httpHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
rp, err := url.Parse(service)
if err != nil {
w.WriteHeader(500)
w.WriteHeader(http.StatusInternalServerError)
return
}