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
a622c47b
Commit
a622c47b
authored
Jul 26, 2024
by
Michael Yang
Browse files
fix nil deref in auth.go
parent
ec4c35fe
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 @
a622c47b
...
...
@@ -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 @
a622c47b
...
...
@@ -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