Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
079b2c3b
Unverified
Commit
079b2c3b
authored
Jul 26, 2024
by
Michael Yang
Committed by
GitHub
Jul 26, 2024
Browse files
Merge pull request #5999 from ollama/mxyng/fix-push
fix nil deref in auth.go
parents
750c1c55
a622c47b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
server/auth.go
server/auth.go
+1
-1
server/upload.go
server/upload.go
+1
-1
No files found.
server/auth.go
View file @
079b2c3b
...
...
@@ -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
}
...
...
server/upload.go
View file @
079b2c3b
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment