Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock request: X-WOPI-Lock might not be returned with 409 #421

Open
mikekaganski opened this issue Jun 30, 2020 · 4 comments
Open

Lock request: X-WOPI-Lock might not be returned with 409 #421

mikekaganski opened this issue Jun 30, 2020 · 4 comments

Comments

@mikekaganski
Copy link

mikekaganski commented Jun 30, 2020

docs/rest/src/files/Lock.rst tells:

X-WOPI-Lock – A string value identifying the current lock on the file. This header must always be included when responding to the request with 409 Conflict.

However, this contradicts [MS-WOPI] v20190618 3.3.5.1.14, which tells:

X-WOPI-Lock ... This header SHOULD be included when responding with the 409 status code if a different shared lock exists on the file.

(emphasis mine in both quotes)

And actually, if a LOCK request is sent to a checked-out file on a SharePoint server, the response 409 includes X-WOPI-LockFailureReason: ExistingCheckout, X-WOPI-LockedByOtherInterface: true, but no X-WOPI-Lock.

@tylerbutler
Copy link
Member

The documentation contained here is intended for those who are implementing integration with Office on the web. It doesn’t have anything to do with SharePoint.

WOPI hosts integrating with Office on the web must always include a lock header on responses.

@mikekaganski
Copy link
Author

Wow. Fantastic. "The documentation here contradicts the published protocol standard, and contradicts the "reference" implementation of the host by MS (which is intended for integration with OWA/Office on the web). WOPI hosts other than MS must follow the rules other than MS."

@tylerbutler
Copy link
Member

@mikekaganski That is not what I said. Please don’t put words in my mouth.

Can you please clarify what you’re referring to when you write “reference server?”

Also, if I understand correctly, a host that always returns a X-WOPI-Lock header on a 409 response is valid per the SHOULD RFC wording in MS-WOPI. However, it’s possible that I am misunderstanding. If so please clarify the contradictions.

Finally, this documentation is also not related to Office Online Server, the on-premise version of Office for the web. It is very specific in its purpose: to guide WOPI implementations for integration with Office for the web and Office mobile as part of the Cloud Storage Partner Program.

@mikekaganski
Copy link
Author

SHOULD, per RFC 2119, as well as "RECOMMENDED", means "that there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course".

But the protocol specification mentioned initially not only uses this word, that is not the same as "must always"; it goes on, and tells when exactly the header SHOULD appear: it only is RECOMMENDED if a different shared lock exists on the file. What does that mean in practice? There may be valid cases when there is a conflict that prevents the Lock request, but where there is no different shared lock exist that may be returned here. I realize that Office on the web is a bit different, but that doesn't change anything in my example: SharePoint provides a WOPI host implementation, and it shows a valid sample of that situation. Another host - e.g. targeting Office on the web - might also have a similar situation.

Additionally, creating a documentation on a protocol that has its standard, which (the documentation) differs from the standard in details, in fact creates a competing version of the protocol; creates uncertainty in the ecosystem that uses that protocol. That is not good, and has precedents in the history, that made some bad results e.g. for HTML for a long time. The difference must be either put into the standard (of course, it needs some reason for that), or be fixed (made to follow the standard).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants