服务器上的word文件被锁定,Microsoft Word忽略从WebDAV服务器发送的锁定状态

用户在使用基于javaservlet的自定义WebDAV服务器时遇到问题,Microsoft Word无法正确显示文档锁定状态,导致用户可以编辑已锁定的文档直到保存时才收到错误提示。通过Wireshark分析请求和响应,确认WebDAV服务器返回了正确的锁定状态,但Word并未显示。问题可能是Word的锁检查机制。寻求解决方案,可能涉及修改WebDAV响应以确保Word能识别并处理锁定。
摘要由CSDN通过智能技术生成

我正在使用自定义WebDAV implementation(基于java servlet)。这似乎在很大程度上运行良好 - 除了Microsoft Word不报告锁定的文档被锁定到用户。因此,用户可以编辑文档,直到他们尝试保存文档为止,此时用户在Microsoft Word中遇到不友好的“上传失败”消息。Microsoft Word忽略从WebDAV服务器发送的锁定状态

4EAXy.png

我的问题的主要目的是发现,如果我可以修改,以便在WebDAV的反应做一个或多个以下:

获得Microsoft Word中显示给用户一个消息说当前文档被锁定。

如果存在锁定,强制Microsoft Word以只读状态打开文档。

我跑上了提琴手,分析了请求和响应线索,将注释与specifications for WebDAV进行比较。我有点不确定下一步要看什么,所以非常欢迎来自任何WebDAV专家的帮助!

请求1

HEAD http://webdavserver:7161/App/WebDAV/577476_Client%2C_3rd_party_or_internal_account._Rheiner_R%C3%BCckversicherungs_GmBH1.doc HTTP/1.1

User-Agent: Microsoft Office Existence Discovery

Connection: Keep-Alive

Host: webdavserver:7161

响应1

HTTP/1.1 200 OK

Date: Wed, 05 Nov 2014 11:45:32 GMT

Content-Type: application/msword

Last-Modified: Wed, 05 Nov 2014 11:45:30 GMT

ETag: W/"77312-1415187930429"

X-Powered-By: Servlet/2.5 JSP/2.1

请求2

LOCK http://webdavserver:7161/App/WebDAV/577476_Client%2C_3rd_party_or_internal_account._Rheiner_R%C3%BCckversicherungs_GmBH1.doc HTTP/1.1

Cache-Control: no-cache

Connection: Keep-Alive

Pragma: no-cache

Content-Type: text/xml; charset="utf-8"

User-Agent: Microsoft Office Core Storage Infrastructure/1.0

Translate: f

Timeout: Second-3600

Connection: Keep-Alive

Content-Length: 199

Host: webdavserver:7161

<?xml version="1.0" encoding="utf-8" ?>DOMAIN\user

响应2

HTTP/1.1 207 Unknown

Date: Wed, 05 Nov 2014 11:45:32 GMT

Content-Length: 307

Content-Type: text/xml; charset=UTF-8

X-Powered-By: Servlet/2.5 JSP/2.1

http://tidevwls03:7161/OpenTwinsApp/WebDAV/577476_Client%2C_3rd_party_or_internal_account._Rheiner_R%C3%BCckversicherungs_GmBH1.doc

HTTP/1.1 423 Locked

请求3

GET http://webdavserver:7161/App/WebDAV/577476_Client%2C_3rd_party_or_internal_account._Rheiner_R%C3%BCckversicherungs_GmBH1.doc HTTP/1.1

Connection: Keep-Alive

Content-Type: text/xml; charset="utf-8"

User-Agent: Microsoft Office Core Storage Infrastructure/1.0

Depth: 0

Translate: f

Connection: Keep-Alive

Host: webdavserver:7161

响应3

HTTP/1.1 200 OK

Date: Wed, 05 Nov 2014 11:45:32 GMT

Transfer-Encoding: chunked

Content-Type: application/msword

Last-Modified: Wed, 05 Nov 2014 11:45:30 GMT

ETag: W/"77312-1415187930429"

X-Powered-By: Servlet/2.5 JSP/2.1

[byte stream]

要求4

PROPFIND http://webdavserver:7161/App/WebDAV/577476_Client%2C_3rd_party_or_internal_account._Rheiner_R%C3%BCckversicherungs_GmBH1.doc HTTP/1.1

Cache-Control: no-cache

Connection: Keep-Alive

Pragma: no-cache

Content-Type: text/xml; charset="utf-8"

User-Agent: Microsoft Office Core Storage Infrastructure/1.0

Depth: 0

Translate: f

Connection: Keep-Alive

Content-Length: 208

Host: webdavserver:7161

响应4

HTTP/1.1 207 Unknown

Date: Wed, 05 Nov 2014 11:45:33 GMT

Content-Type: text/xml; charset=UTF-8

X-Powered-By: Servlet/2.5 JSP/2.1

http://tidevwls03:7161/OpenTwinsApp/WebDAV/577476_Client%2C_3rd_party_or_internal_account._Rheiner_R%C3%BCckversicherungs_GmBH1.doc

2014-11-05T11:45:30Z

Wed, 05 Nov 2014 11:45:30 GMT

HTTP/1.1 423 Locked

HTTP/1.1 404 Not Found

从在Microsoft Word中这一点似乎轮询服务器试图获得对锁文件。用户仍然不知道文档上有锁定。我认为这证明Word知道锁定。

请求5

LOCK http://webdavserver:7161/App/WebDAV/577476_Client%2C_3rd_party_or_internal_account._Rheiner_R%C3%BCckversicherungs_GmBH1.doc HTTP/1.1

Cache-Control: no-cache

Connection: Keep-Alive

Pragma: no-cache

User-Agent: Microsoft Office Core Storage Infrastructure/1.0

If: (<>)

Translate: f

Timeout: Second-3600

Connection: Keep-Alive

Host: webdavserver:7161

响应5

HTTP/1.1 207 Unknown

Connection: close

Date: Wed, 05 Nov 2014 11:46:07 GMT

Content-Length: 307

Content-Type: text/xml; charset=UTF-8

X-Powered-By: Servlet/2.5 JSP/2.1

http://tidevwls03:7161/OpenTwinsApp/WebDAV/577476_Client%2C_3rd_party_or_internal_account._Rheiner_R%C3%BCckversicherungs_GmBH1.doc

HTTP/1.1 423 Locked

2014-11-05

mrswadge

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值