use the common httppb
This commit is contained in:
parent
a3007ba1b5
commit
da9221ce34
17
http.go
17
http.go
|
@ -12,6 +12,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"go.wit.com/lib/protobuf/gitpb"
|
"go.wit.com/lib/protobuf/gitpb"
|
||||||
|
"go.wit.com/lib/protobuf/httppb"
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -117,14 +118,14 @@ func (pb *Patches) AddHttpToPB(r *http.Request) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pb.HttpRequest = &Patches_HttpRequest{
|
pb.HttpRequest = &httppb.HttpRequest{
|
||||||
Method: r.Method,
|
Method: r.Method,
|
||||||
Url: r.URL.String(),
|
URL: r.URL.String(),
|
||||||
Proto: r.Proto,
|
Proto: r.Proto,
|
||||||
Headers: headers,
|
Headers: headers,
|
||||||
RemoteAddr: getClientIP(r),
|
IP: getClientIP(r),
|
||||||
Host: r.Host,
|
Host: r.Host,
|
||||||
Hostname: r.Header.Get("hostname"),
|
Hostname: r.Header.Get("hostname"),
|
||||||
}
|
}
|
||||||
// pb.HttpRequest.Route = cleanURL(r.URL.Path)
|
// pb.HttpRequest.Route = cleanURL(r.URL.Path)
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue