summaryrefslogtreecommitdiff
path: root/reqToPB.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-08 08:13:40 -0500
committerJeff Carr <[email protected]>2025-09-08 08:13:40 -0500
commit09c36a87b30a6ddf97e3b5a7bd77d36834441aa5 (patch)
treec7b2f5f0e1ff4de8a09f83760028f88b10927309 /reqToPB.go
parentf67d6184139374f168037523f46623e2c32547fc (diff)
track client & server payload sizesv0.0.6
Diffstat (limited to 'reqToPB.go')
-rw-r--r--reqToPB.go17
1 files changed, 9 insertions, 8 deletions
diff --git a/reqToPB.go b/reqToPB.go
index f5aa766..019ad77 100644
--- a/reqToPB.go
+++ b/reqToPB.go
@@ -58,14 +58,15 @@ func ReqToPB(r *http.Request) (*HttpRequest, error) {
// log.Info("TRYING TO MARSHAL bytes:", len(msg), err)
pb := &HttpRequest{
- Method: r.Method,
- URL: r.URL.String(),
- Proto: r.Proto,
- Headers: headers,
- IP: getClientIP(r),
- Host: r.Host,
- Body: msg,
- Hostname: r.Header.Get("hostname"),
+ Method: r.Method,
+ URL: r.URL.String(),
+ Proto: r.Proto,
+ Headers: headers,
+ IP: getClientIP(r),
+ Host: r.Host,
+ ClientData: msg,
+ ClientDataLen: int64(len(msg)),
+ Hostname: r.Header.Get("hostname"),
}
pb.Route = cleanURL(r.URL.Path)