servername in user-agent to play nice
Ted Unangst tedu@tedunangst.com
Mon, 15 Jul 2019 12:57:50 -0400
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
activity.go
→
activity.go
@@ -67,7 +67,7 @@ req, err := http.NewRequest("POST", url, bytes.NewReader(msg))
if err != nil { return err } - req.Header.Set("User-Agent", "honksnonk/5.0") + req.Header.Set("User-Agent", "honksnonk/5.0; " + serverName) req.Header.Set("Content-Type", theonetruename) zig(keyname, key, req, msg) resp, err := client.Do(req)@@ -120,7 +120,7 @@ at = "application/jrd+json"
} req.Header.Set("Accept", at) req.Header.Set("Accept-Encoding", "gzip") - req.Header.Set("User-Agent", "honksnonk/5.0") + req.Header.Set("User-Agent", "honksnonk/5.0; " + serverName) if timeout > 0 { ctx, cancel := context.WithTimeout(context.Background(), timeout) defer cancel()