经典ASP:获取“授权” 标头

发布于 2024-07-26 21:04:53 字数 836 浏览 3 评论 0原文

我一直在互联网上寻找解决方案,但在任何地方都找不到。

我已经通过 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

只是偏爱你 2024-08-02 21:04:53

显然它被服务器的 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文