mirror of
https://github.com/luscis/openlan.git
synced 2025-12-24 11:10:54 +08:00
fix: format http log.
This commit is contained in:
@@ -383,7 +383,7 @@ func (t *HttpProxy) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
t.doRecord(r, 0)
|
||||
via := t.FindBackend(r.URL.Host)
|
||||
if via != nil {
|
||||
t.out.Info("HttpProxy.ServeHTTP %s %s -> %s via %s", r.Method, r.RemoteAddr, r.URL.Host, via.Server)
|
||||
t.out.Info("HttpProxy.ServeHTTP %s <- %s %s", via.Server, r.Method, r.URL.Host)
|
||||
conn, err := t.openConn(via.Protocol, via.Server, via.Insecure)
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusBadGateway)
|
||||
@@ -407,7 +407,7 @@ func (t *HttpProxy) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
t.out.Info("HttpProxy.ServeHTTP %s %s -> %s", r.Method, r.RemoteAddr, r.URL.Host)
|
||||
t.out.Info("HttpProxy.ServeHTTP %s -> %s %s", r.RemoteAddr, r.Method, r.URL.Host)
|
||||
if r.Method == "CONNECT" { //RFC-7231 Tunneling TCP based protocols through Web Proxy servers
|
||||
conn, err := t.openConn("", r.URL.Host, true)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user