Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cf274c6

Browse filesBrowse files
committed
plumbing: use the correct user agent. Fixes #833
1 parent b6bc0c0 commit cf274c6
Copy full SHA for cf274c6

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎plumbing/transport/http/common.go

Copy file name to clipboardExpand all lines: plumbing/transport/http/common.go
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@ import (
1717

1818
"github.com/go-git/go-git/v5/plumbing"
1919
"github.com/go-git/go-git/v5/plumbing/protocol/packp"
20+
"github.com/go-git/go-git/v5/plumbing/protocol/packp/capability"
2021
"github.com/go-git/go-git/v5/plumbing/transport"
2122
"github.com/go-git/go-git/v5/utils/ioutil"
2223
"github.com/golang/groupcache/lru"
2324
)
2425

2526
// it requires a bytes.Buffer, because we need to know the length
2627
func applyHeadersToRequest(req *http.Request, content *bytes.Buffer, host string, requestType string) {
27-
req.Header.Add("User-Agent", "git/1.0")
28+
req.Header.Add("User-Agent", capability.DefaultAgent())
2829
req.Header.Add("Host", host) // host:port
2930

3031
if content == nil {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.