【发布时间】:2014-11-09 22:48:27
【问题描述】:
我在 this page 上使用托管在 GitHub 上的应用的清单 URL 验证我的清单:
https://raw.githubusercontent.com/my_username/my_application/master/manifest.webapp
这是我得到的错误:
清单必须使用 HTTP 标头“
Content-Type: application/x-web-app-manifest+json”提供。请参阅https://developer.mozilla.org/docs/Web/Apps/Manifest#Serving_manifests 了解更多信息。
所以我检查了错误中提到的链接,它说:
如果您从 GitHub Pages 提供清单文件,GitHub 将使用
application/x-web-app-manifest+json的 Content-Type 标头提供它。
假设我需要为我的应用创建一个GitHub page,我创建了它并传递了该链接以进行验证。然后我得到了2个错误:
- JSON 解析错误
- 必须使用 HTTP 标头“
Content-Type: application/x-web-app-manifest+json”提供清单。请参阅https://developer.mozilla.org/docs/Web/Apps/Manifest#Serving_manifests 了解更多信息。
我的 JSON 是有效的,我在 jsLint 上检查过它。另外,我假设当我提供相应的 URL 时,GitHub 页面正在传递所需的标头。还是失败了。
我该如何解决这个问题?
【问题讨论】:
标签: json github content-type firefox-os