经典ASP:获取“授权” 标头
我一直在互联网上寻找解决方案,但在任何地方都找不到。
我已经通过 Fiddler 对本地计算机上的 ASP 页面设置了一个简单的 POST 请求:
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.50727)
Host: localhost
Connection: Keep-Alive
Authorization: Basic xW91bsdtcyNqYTpfs8Jkb4ql
Content-Length: 9
asdfdfdsf
ASP 页面包含以下行:
Response.Write(Request.ServerVariables("HTTP_Authorization"))
它没有写出“Basic .....”,而是根本不写任何内容。 如果我将“HTTP_Authorization”更改为任何其他标头(HTTP_Content_Length),我可以提取它们的值。
ASP 拒绝让我查看该特定标头是否有原因?
谢谢!
I've been searching for a solution on the internet for this, and can not find it anywhere.
I've setup a simple POST request through Fiddler for an ASP page on my local machine:
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.50727)
Host: localhost
Connection: Keep-Alive
Authorization: Basic xW91bsdtcyNqYTpfs8Jkb4ql
Content-Length: 9
asdfdfdsf
The ASP page contains the following line:
Response.Write(Request.ServerVariables("HTTP_Authorization"))
Instead of writing out "Basic .....", it doesn't write anything at all. If I change "HTTP_Authorization" to any of the other headers (HTTP_Content_Length), I can pull in their values.
Is there a reason ASP is refusing to let me see that specific header?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
显然它被服务器的 Windows 身份验证删除了,
我取消选中“集成 Windows 身份验证”,标头开始正确显示
Apparently it was being removed by the server's windows auth
I unchecked "Integrated Windows authentication" and the header started showing up correctly