set useragent
This commit is contained in:
parent
4f9af9e708
commit
dda79b4c5a
@ -4,6 +4,8 @@ import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/git-lfs/git-lfs/lfsapi"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -28,4 +30,5 @@ func init() {
|
||||
gitCommit,
|
||||
)
|
||||
|
||||
lfsapi.UserAgent = VersionDesc
|
||||
}
|
||||
|
@ -13,7 +13,11 @@ import (
|
||||
"github.com/rubyist/tracerx"
|
||||
)
|
||||
|
||||
var UserAgent = "git-lfs"
|
||||
|
||||
func (c *Client) Do(req *http.Request) (*http.Response, error) {
|
||||
req.Header.Set("User-Agent", UserAgent)
|
||||
|
||||
res, err := c.doWithRedirects(c.httpClient(req.Host), req, nil)
|
||||
if err != nil {
|
||||
return res, err
|
||||
|
Loading…
Reference in New Issue
Block a user