维基百科发出指示的
永久归属
http://fr.wikipedia.org/wiki/Monastère_d '阿尔卡季
现在
https://fr.wikipedia.org/wiki/Monast%C3%A8re_d' 阿尔卡季
一个HTTP 301
如果你看看在响应标题,您将看到位置标题具有更新的URL。
它成功地在浏览器下载页面,因为浏览器会自动使用新的位置。
UPDATE
如果我输入https://fr.wikipedia.org/wiki/Monast%C3%A8re_d%27Arkadi
在IE(在301响应的Location头的值),我得到一个HTTP 200。然而,我使用的HttpClient还得到一个HTTP 301。
如果我使用WebClient
,我得到的错误“太多的重定向已尝试”。它看起来像在这里发生了某种重定向循环。我正在进一步探索。
更新2
我下载using wget的页面,以详细记录。请注意,wget无法验证维基百科的SSL证书,并且存在两个重定向:从http URL到https URL,然后再到具有转义字符的URL。
E:\Software\GnuWin32\bin>wget -v --no-check-certificate http://fr.wikipedia.org/wiki/Monastère_d'Arkadi
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = E:\Software\GnuWin32/etc/wgetrc
--2015-10-17 23:22:43-- http://fr.wikipedia.org/wiki/Monast%E8re_d'Arkadi
Resolving fr.wikipedia.org... 208.80.154.224
Connecting to fr.wikipedia.org|208.80.154.224|:80... connected.
HTTP request sent, awaiting response... 301 TLS Redirect
Location: https://fr.wikipedia.org/wiki/Monast%E8re_d'Arkadi [following]
--2015-10-17 23:22:44-- https://fr.wikipedia.org/wiki/Monast%E8re_d'Arkadi
Connecting to fr.wikipedia.org|208.80.154.224|:443... connected.
WARNING: cannot verify fr.wikipedia.org's certificate, issued by `/C=BE/O=GlobalSign nv-sa/CN=GlobalSign Organization Va
lidation CA - SHA256 - G2':
Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://fr.wikipedia.org/wiki/Monast%C3%A8re_d%27Arkadi [following]
--2015-10-17 23:22:44-- https://fr.wikipedia.org/wiki/Monast%C3%A8re_d%27Arkadi
Connecting to fr.wikipedia.org|208.80.154.224|:443... connected.
WARNING: cannot verify fr.wikipedia.org's certificate, issued by `/C=BE/O=GlobalSign nv-sa/CN=GlobalSign Organization Va
lidation CA - SHA256 - G2':
Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `MonastA"re_d'Arkadi'
[ <=> ] 171,252 463K/s in 0.4s
2015-10-17 23:22:45 (463 KB/s) - `MonastA"re_d'Arkadi' saved [171252]
非常有趣。我已经提出了一个问题。 http://stackoverflow.com/q/33195267/17447 – naveen