自定义 WebDAV 服务器不适用于 Windows 7 迷你重定向器 [英] Custom WebDAV server does not work with Windows 7 mini-redirector

查看:38
本文介绍了自定义 WebDAV 服务器不适用于 Windows 7 迷你重定向器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在维护一个自定义 WebDav 服务器,它可以与大多数 WebDav 客户端(例如 Cadaver、Mac OSX 等)顺利配合,但不适用于 Windows 迷你重定向器,即 Windows 资源管理器中的网络驱动器.

I am maintaining a custom WebDav server, which works smoothly with most WebDav clients such as Cadaver, Mac OSX, etc, but does not work with Windows mini-redirector, i.e. net drive in Windows Explorer.

服务器实现了摘要式身份验证.

The server implemented Digest authentication.

症状是:即使我输入了正确的凭据,也总是提示我输入用户名和密码.更奇怪的是,当我使用 Fiddler 时,问题就消失了.

The symptom is: I was always prompted for entering username and password even after I entered correct credentials. Even more weird thing is, when I am using Fiddler, the problem is gone.

我研究了几种可能性:1. 持久连接问题,但我的 apache 服务器启用了摘要和 webdav 与 win 7 客户端顺利工作.2. 默认命名空间问题.https://issues.apache.org/bugzilla/show_bug.cgi?id=49428,但我的服务器也没有这个问题.

I have looked into several possibilities: 1. persistent connection issue, but my apache server enabled digest and webdav works smoothly with win 7 client. 2. default namespace issue. https://issues.apache.org/bugzilla/show_bug.cgi?id=49428, but my server does not have this problem neither.

你能给我一些提示吗?谢谢

Could you please give me some hints on this ? Thank you

推荐答案

结果证明这是一个连接问题.根本原因是当先前的连接断开时,win7 迷你重定向器不会发送缓存的授权"标头.

This turned out to be a connection issue. The root cause was that win7 mini-redirector DOES NOT send cached "Authorization" header when previous connection was dropped.

Digest 通常的握手是这样的:

The usual handshake of Digest is like this:

  1. 客户端启动连接C,发送请求R
  2. 带有 401 的服务器响应,通过连接 C 发送回,是否丢弃,这取决于
  3. 客户端获取 401,计算授权"标头
  4. 如果 C 不再存在,则启动另一个连接 C',并通过 C' 发送另一个包含标头的请求 R',或者如果 C 仍然活着,则通过 C 发送 R'.
  5. 服务器对请求进行身份验证,如果凭据正确则返回 200.

win7 dav 客户端的问题在上面的第 4 步,因为我的服务器会在第 2 步中断开连接 C,所以在第 4 步中,win 7 将不会发送 R',其中包含授权头",它将重新开始创建一个新的连接 C',再次发送普通请求 R!

The problem with win7 dav client is at step 4. above, because my server will drop the connection C in step 2, so in step 4, win 7 will NOT send R', which includes the "Authorization header", it will start over to create a new connection C', send plain request R again!

因此,用户会观察到这个奇怪的我正确输入了用户名和密码,但它总是再次询问我"错误.

Hence the user will observe this weird "I entered username and password correctly but it always asks me again" error.

请参阅我的博客了解更多详情:http://dark9t.github.io/blog/2014/06/02/why-digest-authentication-fails-in-windows-7-mini-redirector/

Please refer to my blog for further details: http://dark9t.github.io/blog/2014/06/02/why-digest-authentication-fails-in-windows-7-mini-redirector/

这篇关于自定义 WebDAV 服务器不适用于 Windows 7 迷你重定向器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆