linglong-pica 1.2.8-1
ll-pica-flatpak
按要求把 Flatpak 应用转成玲珑包,执行:
ll-pica-flatpak convert org.prismlauncher.PrismLauncher --build
输出:
多次重试,结果一致。 排查 直接测试同一个 URL,只改 User-Agent:
多次重试,结果一致。
直接测试同一个 URL,只改 User-Agent:
curl/8.0
ostree/2024.6
flatpak/1.16.6
libostree/2024.6
再对同一仓库的不同路径做对照(路径均为 https://dl.flathub.org/repo/...):
https://dl.flathub.org/repo/...
objects/cc/caf1e00e….commit
summary
config
结论:flathub 侧对 libostree/... 这个 User-Agent 有针对性的拦截规则, 且只作用于 objects/ 路径;summary、config 不受影响。
libostree/...
objects/
ll-pica-flatpak 拉取对象时用的正是 libostree/2024.6,所以必然 403。
旁证:flatpak install flathub org.prismlauncher.PrismLauncher 可以正常下载安装, 说明 flathub 服务本身没问题,差别就在 User-Agent。
flatpak install flathub org.prismlauncher.PrismLauncher
把 ll-pica-flatpak 请求 flathub 时使用的 User-Agent 改为 ostree/ 或 flatpak/,即可绕过该拦截。
ostree/
flatpak/
linglong-pica
ll-pica-flatpak convert <应用 ID> --build
Downloading app data from flathub
URL="https://dl.flathub.org/repo/objects/cc/caf1e00e0e4826d615a206f71099fb8da104f5754247ccc69e094d92a37cf6.commit" curl -sS -A "libostree/2024.6" -o /dev/null -w "%{http_code}\n" "$URL" # 403 curl -sS -A "ostree/2024.6" -o /dev/null -w "%{http_code}\n" "$URL" # 200
改成可配吧
libostree/xxxx.x 这是ostree命令默认的头信息,不知道为啥flatpak要禁用掉
libostree/xxxx.x
提了一个PR https://github.com/linuxdeepin/linglong-pica/pull/97
Featured Collection
Popular Ranking
Popular Events
【BUG】ll-pica-flatpak 转换 Flatpak 应用时 403,原因是 User-Agent 被 flathub 拦截
环境
linglong-pica 1.2.8-1,即应用商店里的「玲珑转制工具」ll-pica-flatpak现象
按要求把 Flatpak 应用转成玲珑包,执行:
输出:
curl/8.0ostree/2024.6flatpak/1.16.6libostree/2024.6再对同一仓库的不同路径做对照(路径均为
https://dl.flathub.org/repo/...):libostree/2024.6ostree/2024.6objects/cc/caf1e00e….commitsummaryconfig结论:flathub 侧对
libostree/...这个 User-Agent 有针对性的拦截规则,且只作用于
objects/路径;summary、config不受影响。ll-pica-flatpak拉取对象时用的正是libostree/2024.6,所以必然 403。旁证:
flatpak install flathub org.prismlauncher.PrismLauncher可以正常下载安装,说明 flathub 服务本身没问题,差别就在 User-Agent。
建议
把
ll-pica-flatpak请求 flathub 时使用的 User-Agent 改为ostree/或
flatpak/,即可绕过该拦截。复现步骤汇总
linglong-pica)flatpak install flathub org.prismlauncher.PrismLauncherll-pica-flatpak convert <应用 ID> --buildDownloading app data from flathub阶段返回 HTTP 403附:可自行验证的最小命令