对无效代理身份验证的 HTTP 响应?
如果代理服务器需要授权,它会返回 HTTP 407(“需要代理身份验证”)状态代码。
但是,如果代理服务器提供的授权无效,会发生什么情况?它是否返回另一个 HTTP 407 或 HTTP 401(“未经授权”)或......? (一个用例可能是来自.NET的System.Net.WebClient
使用恰好无效的“默认代理凭据”。)
我不介意一些“自己尝试的步骤” ”,但我的 HTTP-foo 很弱,而且我自己没有这样的代理服务器(所以此时对我来说这更多是一个假设的问题)。我浏览过 RFC 2616 (包括“14.34 代理授权”),但我没有能够收集任何东西——很可能是我的疏忽——并且非常感谢对描述行为的适用部分的引用。
If a proxy server requires authorization it returns an HTTP 407 ("Proxy Authentication Required") status code.
However, what happens if a proxy server is provided authorization which is invalid? Does it return another HTTP 407 or an HTTP 401 ("Unauthorized") or ...? (A use-case might be where System.Net.WebClient
from .NET uses the "default proxy credentials" which happen to be invalid.)
I wouldn't mind some "steps to try it out myself", but my HTTP-foo is weak and I have no such proxy server myself (so it's more of a hypothetical question for me at this point). I have skimmed through RFC 2616 (including "14.34 Proxy-Authorization") but I was not able to glean anything -- very possibly an oversight on my part -- and references to the applicable sections describing the behavior are also very much appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据 RFC 2617:
Per RFC 2617: