servername in user-agent to play nice
This commit is contained in:
parent
e9da20ff42
commit
46a50e5b80
|
@ -67,7 +67,7 @@ func PostMsg(keyname string, key *rsa.PrivateKey, url string, msg []byte) error
|
|||
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 @@ func GetJunkTimeout(url string, timeout time.Duration) (junk.Junk, error) {
|
|||
}
|
||||
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()
|
||||
|
|
Loading…
Reference in New Issue