提交 41f91183 编写于 作者: W WangFengTu 提交者: lifeng68

fix bug of registry mirrors

Signed-off-by: NWangFengTu <wangfengtu@huawei.com>
上级 48d3f667
......@@ -104,7 +104,7 @@ char *oci_host_from_mirror(const char *mirror)
if (util_has_prefix(mirror, HTTPS_PREFIX)) {
host = mirror + strlen(HTTPS_PREFIX);
} else if (util_has_prefix(mirror, HTTPS_PREFIX)) {
} else if (util_has_prefix(mirror, HTTP_PREFIX)) {
host = mirror + strlen(HTTP_PREFIX);
}
......
......@@ -128,7 +128,7 @@ static int pull_image(const im_pull_request *request, char **name)
} else {
registry_mirrors = conf_get_registry_list();
for (mirror = registry_mirrors; (mirror != NULL) && (*mirror != NULL); mirror++) {
if (util_has_prefix(*mirror, HTTPS_PREFIX)) {
if (util_has_prefix(*mirror, HTTP_PREFIX)) {
options->insecure_registry = true;
}
host = oci_host_from_mirror(*mirror);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册