fix(backend): url path correct parsing
This commit is contained in:
parent
77e7ad4edb
commit
0716819492
2 changed files with 7 additions and 3 deletions
|
|
@ -85,7 +85,7 @@ func (conn *Conn) InsertWebPageEvent(sessionID uint64, e *PageEvent) error {
|
|||
host, path, query,
|
||||
e.DomContentLoadedEventEnd, e.LoadEventEnd, e.ResponseEnd, e.FirstPaint, e.FirstContentfulPaint,
|
||||
e.SpeedIndex, e.VisuallyComplete, e.TimeToInteractive,
|
||||
calcResponseTime(e), calcDomBuildingTime(e)
|
||||
calcResponseTime(e), calcDomBuildingTime(e),
|
||||
); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,10 @@ func GetURLParts(rawURL string) (string, string, string, error) {
|
|||
if err != nil {
|
||||
return "", "", "", err
|
||||
}
|
||||
// u.Scheme ?
|
||||
return u.Host, u.RawPath, u.RawQuery, nil
|
||||
// u.Scheme u.Fragment / RawFragment ?
|
||||
path := u.Path
|
||||
if u.RawPath != "" {
|
||||
path = u.RawPath
|
||||
}
|
||||
return u.Host, path, u.RawQuery, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue