08-10
30

原来RFC规定url是不准带下划线的

今天想在tencent的网站下载一个foxmail,发觉打开连接失败,提示如下:


ERROR
The requested URL could not be retrieved

--------------------------------------------------------------------------------

While trying to retrieve the URL: http://dl_dir.qq.com/foxmail/foxmail65beta02.exe

The following error was encountered:

Invalid URL
Some aspect of the requested URL is incorrect. Possible problems:

Missing or incorrect access protocol (should be `http://'' or similar)
Missing hostname
Illegal double-escape in the URL-Path
Illegal character in hostname; underscores are not allowed
Your cache administrator is sysadm@cse.cuhk.edu.hk.



--------------------------------------------------------------------------------

Generated Tue, 05 Aug 2008 14:17:54 GMT by pluto.cse.cuhk.edu.hk (squid/2.5.STABLE12)

仔细看,似乎是因为underscore的问题。

网上搜得出了这个答案:

出错的原因是你提到的这个域名有一个不称职的管理员。


RFC 1034中明确指出:

代码:  

The following syntax will result in fewer problems with many applications that use domain names (e.g., mail, TELNET).

<domain> ::= <subdomain> | " "

<subdomain> ::= <label> | <subdomain> "." <label>

<label> ::= <letter> [ [ <ldh-str> ] <let-dig> ]

<ldh-str> ::= <let-dig-hyp> | <let-dig-hyp> <ldh-str>

<let-dig-hyp> ::= <let-dig> | "-"

<let-dig> ::= <letter> | <digit>

<letter> ::= any one of the 52 alphabetic characters A through Z in upper case and a through z in lower case

<digit> ::= any one of the ten digits 0 through 9




下划线有保留意义,不能随意使用。


文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags: tencent RFC
相关日志:
评论: 0 | 引用: 0 | 查看次数: 760
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 1000 字 | UBB代码 开启 | [img]标签 关闭