Skip to content

Commit

Permalink
Clarify if
Browse files Browse the repository at this point in the history
  • Loading branch information
fortuna committed Sep 26, 2023
1 parent 4c63acf commit 39117ef
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions x/httpproxy/connect_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ func (h *handler) ServeHTTP(proxyResp http.ResponseWriter, proxyReq *http.Reques
if proxyReq.Method == http.MethodConnect {
h.handleConnect(proxyResp, proxyReq)
return
} else if proxyReq.URL.Host != "" {
}
if proxyReq.URL.Host != "" {
h.handleHTTPProxyRequest(proxyResp, proxyReq)
} else {
http.Error(proxyResp, "Not Found", http.StatusNotFound)
return
}
http.Error(proxyResp, "Not Found", http.StatusNotFound)
}

func (h *handler) handleHTTPProxyRequest(proxyResp http.ResponseWriter, proxyReq *http.Request) {
Expand Down

0 comments on commit 39117ef

Please sign in to comment.