Skip to content

Commit

Permalink
Merge pull request ollama#5999 from ollama/mxyng/fix-push
Browse files Browse the repository at this point in the history
fix nil deref in auth.go
  • Loading branch information
mxyng authored Jul 26, 2024
2 parents 750c1c5 + a622c47 commit 079b2c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func getAuthorizationToken(ctx context.Context, challenge registryChallenge) (st

headers.Add("Authorization", signature)

response, err := makeRequest(ctx, http.MethodGet, redirectURL, headers, nil, nil)
response, err := makeRequest(ctx, http.MethodGet, redirectURL, headers, nil, &registryOptions{})
if err != nil {
return "", err
}
Expand Down
2 changes: 1 addition & 1 deletion server/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ func (b *blobUpload) uploadPart(ctx context.Context, method string, requestURL *

// retry uploading to the redirect URL
for try := range maxRetries {
err = b.uploadPart(ctx, http.MethodPut, redirectURL, part, nil)
err = b.uploadPart(ctx, http.MethodPut, redirectURL, part, &registryOptions{})
switch {
case errors.Is(err, context.Canceled):
return err
Expand Down

0 comments on commit 079b2c3

Please sign in to comment.