Connect libreoffice 5.3.4 with application using WebDAV

We are trying to connect libreoffice 5.3.4 with our application using WebDAV.

When we open the document GET-request works, we transfer the required file, our document is opened correctly after editing.

If we try to save the document we expect PUT-request or POST-reguest with modified file data. But request doesn’t come.

What should we write in addition?

First of all, it’s unclear from your description what opens what, and what sends what. “When we open” - what are “we”? “we transfer”, “document is opened correctly” - where? - “after editing” - what editing? “If we try to save” - from what application? It’s unclear where LibreOffice part is here, and where is your application’s.

Mike, there are some details, look the “1 Answer”, please

Plugin opens Libreoffice after user’s click. To say simply user opens the Libreoffice.

We have java-application (Spring framework). We try to realise the next functionality:
User clicks on link (…/webdav/id/document_name.odt) and as the result system opens the document in Libreoffice.
User can edit the document and save it in database (PostgreSQL).

Opening document functionality works correctly:
We have written a simple servlet (Configure Tomcat WebDAV Access In 3 Easy Steps | MuleSoft step-1).
The servlet handles the request from Libreoffice (PROPFIND,OPTIONS,GET)

When our application gets the PROPFIND-request from Libreoffice our server writes the next responce:

<?xml version="1.0" encoding="utf-8" ?> http://localhost:8080/julia/webdav/id/document_name.odt application/vnd.oasis.opendocument.text HTTP/1.1 200 OK HTTP/1.1 404 Not Found

When our application gets GET-request our server writes file data (byte[]) from database as the responce

When our application gets OPTIONS-request our server writes the next headers in the responce:

“DAV”, “1, 2, ordered-collections”
“Allow”, “OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, COPY, MOVE, MKCOL, PROPFIND, PROPPATCH, LOCK, UNLOCK, ORDERPATCH”
“MS-Author-Via”, “DAV”

After all Libreoffice opens our document and user can edit it.

If user edits the document and tries to save, server will not get request with changes. So our application can’t save the modified document in database. (PUT or POST). Server gets only PROPFIND-request, OPTIONS-request and HEAD-request.

Example: Screenshot by Lightshot