Skip to content

Commit

Permalink
fix: unparseable referer
Browse files Browse the repository at this point in the history
  • Loading branch information
LeKovr committed Feb 18, 2020
1 parent 8b581ea commit 60b2758
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions nginx/nginx.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,16 @@ func Run(db *pgxpool.Pool, conf []byte, fileID int, source io.Reader, stat *Stat
var args map[string][]string
row["ref_url"], args, err = parseURL(ref, config.UTF8Prefix)
if err != nil {
return err
}
var a []byte
a, err = json.Marshal(args)
if err != nil {
return err
fmt.Printf("\nFound unparseable referer URL: %+v\n", err)
} else {
var a []byte
a, err = json.Marshal(args)
if err != nil {
return err
}
row["ref_args"] = string(a)
delete(row, "referer")
}
row["ref_args"] = string(a)
delete(row, "referer")
}
}
//fmt.Printf("Rec: %+v\n", row)
Expand Down

0 comments on commit 60b2758

Please sign in to comment.