我有一个Microsoft Band 2,我正在尝试将RSS源加载到webtile中,但它总是说“数据获取错误,此块的数据似乎有问题...稍后再试“
这是XML:
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<atom:link href="[this was linked to a private feed before posting on stackoverflow]" rel="self" type="application/rss+xml" />
<title>test</title>
<link>http://www.microsoft.com/</link>
<description>Test</description>
<language>en-us</language>
<ttl>1</ttl>
<item>
<guid>http://www.microsoft.com/</guid>
<pubDate>Mon, 29 Feb 2016 08:00:00 EST</pubDate>
<title>TEST TITLE</title>
<description>Testing</description>
<link>http://www.microsoft.com/</link>
</item>
</channel>
</rss>
我的清单:
{
"manifestVersion": 1,
"name": "Test tile",
"description": "Test tile",
"version": 1,
"versionString": "1",
"author": "MRW",
"organization": "MRW",
"contactEmail": "",
"tileIcon": {
"46": "icons/tileIcon.png"
},
"badgeIcon": {
"24": "icons/badgeIcon.png"
},
"icons": {},
"refreshIntervalMinutes": 30,
"tileTheme": {
"base": "ffaf00",
"highlight": "ffaf00",
"lowlight": "f99a03",
"secondary": "9e9678",
"highContrast": "ffa500",
"muted": "bc8b00"
},
"resources": [
{
"url": "[this was linked to a private feed before posting on stackoverflow]",
"style": "Feed",
"content": {
"_1_title": "title",
"_1_description": "description"
}
}
],
"pages": [
{
"layout": "MSBand_ScrollingText",
"condition": "true",
"textBindings": [
{
"elementId": "1",
"value": "{{_1_title}}"
},
{
"elementId": "2",
"value": "{{_1_description}}"
}
]
}
],
"notifications": [
{
"condition": "{{_1_title}} != \"now\"",
"title": "{{_1_title}}",
"body": "{{_1_description}}"
}
]
}
我的Microsoft Band 2是否无法从互联网上获取,可能吗?有什么需要检查的吗?
就我的XML而言 - 我错过了什么吗? Band 2是否还有其他一些XML要求
答案 0 :(得分:0)
Microsoft Band 2发送“用户代理:Mozilla / 5.0”请求标头。
不幸的是,大多数托管服务提供商都启用了mod_security阻止该标头。
有效标题是“user-agent:Mozilla / 5.0(Windows NT)”,“user-agent:Mozilla / 5.0(test)”或甚至“user-agent:Mozilla / 5.0()”
您必须重新配置mod_security或禁用它。