相对于RSS/Atom feed的链接,在Firefox中不起作用 [英] Link to RSS/Atom feed, relative, doesn't work in Firefox

查看:73
本文介绍了相对于RSS/Atom feed的链接,在Firefox中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个奇怪的问题.我生成了一个HTML页面,我们将其托管在 http://www.x.com/stuff 上,该页面包含

I have a weird problem. I generate a HTML page, hosted let's say at http://www.x.com/stuff which contains

<head>
  <link type="application/atom+xml" rel="alternate" href="/stuff/feed"/>
  ..
</head>

结果是:

  • 在IE7中,一切正常-您可以在浏览器中单击供稿图标,然后显示供稿
  • 在Firefox中,查看源代码,单击链接的/stuff/feed ,您将看到源代码的来源,因此可以正常工作
  • 在Firefox中,查看页面(不是源),然后单击地址栏中的feed图标,我收到一个错误,提示它无法检索URL feed://http//www.x.com/stuff/feed
  • In IE7 all works well - you can click on the feed icon in the browser and the feed is displayed
  • In Firefox, view source, click on the linked /stuff/feed and you see the source of the feed, so that works as expected
  • In Firefox, view the page (not source), then click on the feed icon in the address bar, I get an error that it can't retrieve the URL feed://http//www.x.com/stuff/feed

问题是,它会将 feed://附加到URL的开头,然后在 http :.代码>.我知道 feed:仍然是HTTP,所以添加它可能不是什么大问题.

So the problem is, that it's appending feed:// to the front of the URL and then taking out the colon : after the http. I understand that feed: is HTTP anyway so perhaps the adding of that isn't a big problem.

但是无论如何,事实是,Firefox从我的< link> 标记中生成的URL不起作用.

But anyway, the fact is, that URL Firefox generates out of my <link> tag doesn't work.

我已经考虑过将URL设为绝对,但是我还没有发现任何证据表明这些URL必须是绝对的,我也不明白为什么会是这种情况.并且由于各种原因,在我的代码中生成绝对URL会很不方便.如有必要,我可以这样做,但我希望在使代码混乱之前先查看证明(例如,规范或Mozilla错误报告)

I have considered making the URL absolute, but I haven't found any evidence that those URLs have to be absolute, nor can I understand why that would be the case. And for various reasons it would be inconvenient in my code to generate an absolute URL. I can do it if necessary but I would prefer to see proof (e.g. specification, or Mozilla bug report) that it's necessary before making my code messy

您怎么看?有谁知道URL应该是绝对的证据吗?还是我做错了其他事?似乎是一个简单/明显的标记,没有什么地方会出错,但我无法正常工作.

What do you think? Does anyone know of any evidence that the URL should be absolute? Or am I doing something else wrong? It seems such a simple/obvious tag, where nothing could go wrong, but I can't get it to work.

推荐答案

我遇到了同样的问题.IT是由我的网络流量正在运行的代理服务器引起的.Firefox将"http://server.tld/feed-url"更改为"feed://http//server.tld/feed-url".由于我所有http流量都经过的Web代理无法识别"feed://"协议,因此它将我的请求视为无效.

I had the same problem. IT was caused by the proxy server at work that my web traffic was going through. Firefox changed "http://server.tld/feed-url" to "feed://http//server.tld/feed-url". Since the web proxy that all my http traffic is going through does not recognize the "feed://" protocol, it rejects my request as invalid.

到目前为止,我发现的唯一解决方法是在Firefox中手动配置代理设置.现在,您可能已经由系统自动配置了它们.如果知道代理信息,则可以手动配置它.仅对http/https/ftp这样做才允许我访问提要,因为Firefox然后直接处理了提要://URL(最终将它重定向到http://,就像我想要的那样).

The only workaround I have found so far is to manually configure the proxy settings in Firefox. Right now you probably have them automatically configured by your system. If you know your proxy information, you can instead manually configure it. Doing so only for http/https/ftp allowed me to access the feed because Firefox then handled the feed:// URL directly (which ended up with it redirecting to http:// like I wanted).

要直接配置代理设置,您需要转到编辑"->首选项"->高级"->设置"(连接"旁边).使用手动设置.您必须确定系统已在使用的代理设置.

To configure your proxy settings directly, you'll need to go to Edit -> Preferences -> Advanced -> Settings (next to "Connection"). Use manual settings. You'll have to determine the proxy settings that your system is already using.

请注意,缺少冒号(Piet提到)不是您网站上的错误.这是Firefox订阅正在执行的转换.还要注意,这不是由Julien建议的由相对URL引起的问题.Firefox将其转换为绝对URL,但随后删除了http://协议前缀中的冒号,以便可以将其附加到"feed://"(更改协议并提供原始的绝对URL作为"URL"用于新的"Feed"协议).

Note that the missing colon (mentioned by Piet) is not a bug on your site. It's a conversion that the Firefox subscribe is doing. Also note that it is not a problem caused by a relative URL as Julien suggests. Firefox is converting it to an absolute URL, but then removing the colon in the http:// protocol prefix so that it can be appended to "feed://" (changing the protocol and supplying the original absolute URL as the "URL" for the new "feed" protocol).

这篇关于相对于RSS/Atom feed的链接,在Firefox中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆