链接到RSS / Atom提要,相对而言,在Firefox中不起作用 [英] Link to RSS/Atom feed, relative, doesn't work in Firefox

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

问题描述

我有一个奇怪的问题。我生成一个HTML页面,让我们在 http://www.x.com/stuff 上说,它包含

 < head> 
< link type =application / atom + xml =alternatehref =/ stuff / feed/>
..
< / head>

结果是:

$ ul $ b

  • 在IE7中运行良好 - 您可以单击浏览器中的提要图标并显示提要

  • 在Firefox中查看源代码,单击链接的 / stuff / feed ,你会看到提要的来源,所以按预期工作

  • 在Firefox中,查看页面(不是源代码),然后点击地址栏中的提要图标,我得到一个错误,它无法检索URL feed://http//www.x.com/stuff/feed feed://

  • $ b 到URL的前面,然后在 http 之后取出冒号。我知道 feed:是HTTP,所以也许这个添加不是一个大问题。



    但是无论如何,事实上,火狐浏览器从我的< link> 标签生成的URL不起作用。



    我曾经考虑过把网址做成绝对的,但是我还没有找到任何证据表明这些网址必须是绝对的,我也不能理解为什么会这样。由于各种原因,在我的代码中生成绝对URL会很不方便。我可以做到这一点,如果有必要,但我宁愿看到证明(如规范,或Mozilla的bug报告),这是必要的,使我的代码凌乱之前



    你怎么看?有谁知道任何证据的网址应该是绝对的?还是我在做别的事呢?这似乎是一个简单/明显的标签,没有什么可能会出错,但我不能得到它的工作。

    解决方案

    我有同样的问题。 IT是由我的网络流量正在工作的代理服务器造成的。 Firefox将http://server.tld/feed-url改为feed://http//server.tld/feed-url。由于所有我的HTTP流量正在经历的Web代理无法识别feed://协议,因此拒绝我的请求为无效。



    唯一的解决方法I目前发现的是在Firefox中手动配置代理设置。现在你可能会让系统自动配置它们。如果你知道你的代理信息,你可以改为手动配置它。这样做只为HTTP / HTTPS / FTP允许我访问饲料,因为Firefox然后直接处理饲料:/ / URL(结束了它重定向到http://像我想的那样)。



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



    请注意,缺少冒号(由Piet提及)不是您网站上的错误。这是Firefox订阅正在进行的转换。另外请注意,这不是Julien建议的由相对URL造成的问题。 Firefox会将它转换为一个绝对URL,然后去除http://协议前缀中的冒号,以便将其附加到feed://(更改协议并提供原始绝对URL作为URL为新的饲料协议)。

    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>
    

    The result is:

    • 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

    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.

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

    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

    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.

    解决方案

    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.

    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.

    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提要,相对而言,在Firefox中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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