During communication with a WebDAV server, if LibreOffice has acquired a lock, it MUST use an "If" header with Lock-Token uri (cf. https://tools.ietf.org/html/rfc4918#section-7) in PUT queries to be allowed to update the locked resource.
For now, as it's not the case, the WebDAV server refuses the PUT query with a "423 Locked" response and LibreOffice displays an error message saying "The file is locked by yourself"...
Giuseppe: thought you might be interested in this one.
(In reply to FeelAirSlow from comment #0)
> For now, as it's not the case, the WebDAV server refuses the PUT query with
> a "423 Locked" response and LibreOffice displays an error message saying
> "The file is locked by yourself"...
when you spare time, can you try with LO 5.1.x version?
(In reply to Giuseppe Castagno (aka beppec56) from comment #2)
> when you spare time, can you try with LO 5.1.x version?
All my tests are already done with LO 18.104.22.168
Strange, because on that version I didn't hit this kind of problem.
I need to know:
1) what WebDAV server are you using?
2) the exact LO version, you can copy from the Help > About dialog and paste here.
3) what operation are you performing on LO when the bug hits you?
(In reply to Giuseppe Castagno (aka beppec56) from comment #4)
* WebDAV server : "IT Hit WebDAV server"
* LibreOffice :
Build ID: 89f508ef3ecebd2cfb8e1def0f0ba9a803b88a6d
Threads CPU : 4; Version de l'OS :Windows 6.1; UI Render : par défaut;
Locale : fr-FR (fr_FR)
* Steps to reproduce the bug :
1) Go to "http://www.ajaxbrowser.com/" (live demo of IT hit webdav server)
2) Open "Sales" folder, then right click, then "Upload Files..." to upload any odt file.
3) Right click on the odt file, "Properties"
4) Copy the location URL.
5) Open LibreOffice
6) BE SURE TO USE LibreOffice DIALOG BOX and paste url (there are OPTIONS, PROPFIND, GET, LOCK queries)
7) Save (there is a PUT query without Lock-Token)
8) Error message
NB : LibreOffice behave not the same if you use Windows dialog box (it seems like a legacy mechanism, which uses "Microsoft-WebDAV-MiniRedir" and create ".~lock" file).
(In reply to FeelAirSlow from comment #5)
> 6) BE SURE TO USE LibreOffice DIALOG BOX and paste url (there are OPTIONS,
> PROPFIND, GET, LOCK queries)
I enabled LO dialog box but I don't know what to do then.
Indeed, I used "File/Open" and paste the url in "File Name" but where are the options you quoted?
(In reply to Julien Nabet from comment #6)
> > 6) BE SURE TO USE LibreOffice DIALOG BOX and paste url (there are OPTIONS,
> > PROPFIND, GET, LOCK queries)
> > ...
> I enabled LO dialog box but I don't know what to do then.
> Indeed, I used "File/Open" and paste the url in "File Name" but where are
> the options you quoted?
Sorry for the misunderstanding : after you paste the URL and click "Open", there are WebDAV queries (OPTION, PROPFIND, GET, LOCK)
(In reply to FeelAirSlow from comment #7)
> Sorry for the misunderstanding : after you paste the URL and click "Open",
> there are WebDAV queries (OPTION, PROPFIND, GET, LOCK)
I pasted the url in a brand new doc in Writer, then clicked "Open", I've got no WebDav queries/options at all.
Sorry, I think I can't help here and just make you waste your time so I uncc myself.
(In reply to Julien Nabet from comment #8)
> I pasted the url in a brand new doc in Writer, then clicked "Open", I've got
> no WebDav queries/options at all.
> Sorry, I think I can't help here and just make you waste your time so I uncc
NB : WebDAV HTTP queries cannot be seen without a tool like Fiddler.
Just a question : did you tried to "Save" your file, and did you succeed ?
I repeated the test as follow:
On LO:Version: 22.214.171.124
Build ID: d3bf12ecb743fc0d20e0be0c58ca359301eb705f
CPU Threads: 2; OS Version: Windows 6.1; UI Render: default;
Locale: en-US (en_US)
1) Open http://www.ajaxbrowser.com/
2) using the browser and the context menu upload a file
3) open LO, confirm you have the LO native dialog active (Tools > Options > General, checkbox 'Use Libreoffice Dialog' should be ticked)
4) on browser, open context menu on the file loaded on 2) above
5) select 'Properties' copy the 'Location' URL
6) on LO select 'File Open' paste the URL in 'File name:' edit box
7) open it: the file should open with no error
8) do some editing to file
9) save it. No error shown.
There is another way, using the URL provided on the WebDAV opening page to the right (e.g. something like http://www.ajaxbrowser.com/Userf2f446c)
You may copy it, then:
1) open LO, confirm you have the LO native dialog active (Tools > Options > General checkbox 'Use Libreoffice Dialog' should be ticked)
2) select 'File > Open'
3) paste the root URL into the topmost edit box (the one which contains the file path)
3) hit return, the remote folder should show
4) navigate to the file to open, open it. Then you should be able to edit/save with no problem.
Just a thougth: saw you are on a French locale, what file name you used?
(In reply to Giuseppe Castagno (aka beppec56) from comment #10)
> I repeated the test as follow:
> 9) save it. No error shown.
> Just a thougth: saw you are on a French locale, what file name you used?
I've done the test with your very own file :
I have the error message ! I cannot put the file back.
And I confirm the PUT request does not provide Lock-Token (if I fiddle the query and add the missing "If" header, it works).
> There is another way, using the URL provided on the WebDAV opening page to
> the right (e.g. something like http://www.ajaxbrowser.com/Userf2f446c)
Of course, your alternate method works because it's using OpenOffice legacy WebDAV connection (via Microsoft-WebDAV-MiniRedir and "~.lock file").
But my full use case is opening a link in a web browser.
The protocol handler then starts LibreOffice with the command :
And in this use case, it's like directly opening the full link in the LibreOffice dialog box (using User-Agent: LibreOffice).
now you lost me.
What are you trying to accomplish?
Since all this is happening on a http connection, Wireshark can be of use to log your entire try session.
You may then post the Wireshark log here.
About comment 5: OPTIONS method is not implemented in LO, I don't known what sent it, surely not LO.
> About comment 5: OPTIONS method is not implemented in LO, I don't known what
> sent it, surely not LO.
You're right Giuseppe, my mistake.
> What are you trying to accomplish?
I'm simply trying to edit a WebDAV file from the command line :
And I think I've found why I can't update the file : on my dev machine, I always use Fiddler web debugging proxy.
When Fiddler is off, I can save the file with LO !
But when it's on, LO does not send "If" header with PUT queries.
NB : I suppose it's something in LO instead of Fiddler, because when I use MS-Word via WebDAV with Fiddler on, everything is fine ("If" header is here).
Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the Wireshark log requested.
Created attachment 124671 [details]
Wireshark log, with and without Fiddler
Wireshark log as requested, with and without Fiddler activated.
Took me some time to nail it down.
It seems Fiddler behaves like a sort of proxy server, disrupting the existed lock search while doing PUT operation.
A better description, since this is a general bug.
There a fix on master in this commit:
daily master from here:
has the fix.
If you spare time, you may give it a try, thanks.
Giuseppe Castagno committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":
tdf#99246 Use correct path for lock in PUT method.
It will be available in 5.1.4.
The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.
I've made many tests with the current daily master.
Your fix works great in my use cases.
Thank you for investigating this issue.