Skip to content

Commit

Permalink
Add content-type and accept headers (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
draftcode authored Dec 12, 2024
1 parent 0523acf commit 25f0e8a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/fetch/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ func callProtocolV2HTTP(repoURL string, client *http.Client, body *bytes.Buffer)
if err != nil {
return nil, nil, err
}
req.Header.Set("Content-Type", "application/x-git-upload-pack-request")
req.Header.Set("Accept", "application/x-git-upload-pack-result")
req.Header.Set("Git-Protocol", "version=2")
if client == nil {
client = http.DefaultClient
Expand Down

0 comments on commit 25f0e8a

Please sign in to comment.