Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
iSulad
提交
fba1237b
I
iSulad
项目概览
openeuler
/
iSulad
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
iSulad
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fba1237b
编写于
5月 23, 2020
作者:
W
WangFengTu
提交者:
lifeng68
7月 25, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use https if ping https success
Signed-off-by:
N
WangFengTu
<
wangfengtu@huawei.com
>
上级
a913fe62
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
4 addition
and
9 deletion
+4
-9
src/image/oci/registry/registry.c
src/image/oci/registry/registry.c
+0
-1
src/image/oci/registry/registry_apiv2.c
src/image/oci/registry/registry_apiv2.c
+4
-7
src/image/oci/registry/registry_type.h
src/image/oci/registry/registry_type.h
+0
-1
未找到文件。
src/image/oci/registry/registry.c
浏览文件 @
fba1237b
...
...
@@ -2031,7 +2031,6 @@ void free_pull_desc(pull_descriptor *desc)
free
(
desc
->
protocol
);
desc
->
protocol
=
NULL
;
desc
->
skip_tls_verify
=
false
;
desc
->
already_ping
=
false
;
free
(
desc
->
scope
);
desc
->
scope
=
NULL
;
...
...
src/image/oci/registry/registry_apiv2.c
浏览文件 @
fba1237b
...
...
@@ -34,7 +34,7 @@
#include "isula_libutils/registry_manifest_list.h"
#include "auths.h"
#define DOCKER_API_VERSION_HEADER "Docker-Distribution-A
PI
-Version: registry/2.0"
#define DOCKER_API_VERSION_HEADER "Docker-Distribution-A
pi
-Version: registry/2.0"
#define MAX_ACCEPT_LEN 128
static
int
parse_http_header
(
char
*
resp_buf
,
size_t
buf_size
,
struct
parsed_http_message
*
message
)
...
...
@@ -361,12 +361,13 @@ static int registry_ping(pull_descriptor *desc)
return
-
1
;
}
if
(
desc
->
already_ping
&&
desc
->
protocol
!=
NULL
)
{
if
(
desc
->
protocol
!=
NULL
)
{
return
0
;
}
ret
=
registry_pingv2
(
desc
,
"https"
);
if
(
ret
==
0
)
{
desc
->
protocol
=
util_strdup_s
(
"https"
);
goto
out
;
}
...
...
@@ -378,17 +379,13 @@ static int registry_ping(pull_descriptor *desc)
ERROR
(
"ping %s with http failed"
,
desc
->
host
);
goto
out
;
}
desc
->
protocol
=
util_strdup_s
(
"http"
);
}
else
{
ERROR
(
"ping %s with https failed"
,
desc
->
host
);
}
out:
if
(
ret
==
0
)
{
desc
->
protocol
=
util_strdup_s
(
"http"
);
desc
->
already_ping
=
true
;
}
return
ret
;
}
...
...
src/image/oci/registry/registry_type.h
浏览文件 @
fba1237b
...
...
@@ -90,7 +90,6 @@ typedef struct {
char
*
protocol
;
bool
skip_tls_verify
;
bool
insecure_registry
;
bool
already_ping
;
char
*
scope
;
challenge
challenges
[
CHALLENGE_MAX
];
// This is temporary field. Once http request is performed, it is cleared
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录