Commit Graph

21 Commits (master)

Author SHA1 Message Date
Ashod Nakashian 2e8561195c wsd: move deprecated logic under legacy_server config
We no longer send LOOL-WOPI headers, unless
the configuration specifically flags for
legacy servers. But we always send COOL-WOPI
even to legacy servers, to help them upgrade
seamlessly.

Change-Id: Ifc919ed8f6665cd8f846117ef4e8b7ef09fbd563
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-03-02 04:02:26 -05:00
Michael Meeks 7183a3d3de spdx: improve machine and human readability of headers.
Change-Id: Ice934380029bf27054e830fffc07a5d037d1430f
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-11-14 19:36:31 +00:00
Ashod Nakashian fc6380c31a wsd: test: better UnitWopiLockReadOnly
Fixes a race-condition due to having multiple
views, we will get multiple onDocumentModified.

Change-Id: I806a3cc31f768c9f159e599c69fd1d31755e6cd1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-09-25 08:58:39 +02:00
Caolán McNamara 62504735ea cid#318868 silence bogus Double free
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I4ef594a2274a6a2b646ce2a305cdab6263390ef7
2023-08-16 15:15:59 +02:00
Ashod Nakashian 75ae9894b9 wsd: Util::make_unique -> std::make_unique
Change-Id: I1063913f91571ea6ad95386a3da6a4072574d155
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-08-03 08:40:20 +02:00
Ashod Nakashian 2756d48a5a wsd: test: new UnitWopiLockReadOnly test
Change-Id: I67aec627737fd3e67ad576aaba378b7391641b87
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-12 07:00:41 -04:00
Ashod Nakashian 87bce5dc5d wsd: test: merge UnitWopiUnlock into UnitWOPILock.cpp
Change-Id: If051032e2ed9d7a0ab345bdad710ba1eafe92d96
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-08 04:19:00 -04:00
Ashod Nakashian bc5e9f1ed0 wsd: test: use configCheckFileInfo instead of handleHttpRequest
Change-Id: Iff526bda55e112877df74d55f21bc8108bb384f2
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-06-20 03:55:19 -04:00
Ashod Nakashian c045fc8bea wsd: test: minor cleanup of UnitWopiLock
Change-Id: I66973743c2c84d4f9ad459da323e2db9ba76d5c1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-02-23 07:58:56 -05:00
Ashod Nakashian d1b1f960aa wsd: test: new test to verify refresh lock behavior
Change-Id: If28ab29c43f638f111169673d9a8ee5651fa6da8
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-02-23 07:58:56 -05:00
Ashod Nakashian fa069dca50 wsd: test: support controlling the response to LOCK/UNLOCK
Change-Id: Ie0d836a475f257bded5c73783398a6c300ac9d67
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-02-23 07:58:56 -05:00
Ashod Nakashian 59216fa21c wsd: test: fix UnitWOPILock once and for all
This fixes a race in UnitWOPILock and the
fact that the second view wasn't really
read-only due to empty extensions being
commentable, by default.

Also, improve UnitWOPIUnlock.

Change-Id: I628852d3474042c9e7f54c3d6780e06f694ce141
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-14 08:39:10 -05:00
Ashod Nakashian 9adacb12e2 wsd: test: move assertLockRequest to WopiTestServer
Also, don't rely on the timing to have only one
(editing) session by the time we disconnect.
Instead, make the second connection read-only
so that disconnecting the first will always
result in unlocking the document.

Change-Id: Ibbe8164b22d44b52e7b89ad2a677cb196904cac3
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-12 19:42:30 -05:00
Ashod Nakashian 9022c1059b wsd: improved UnitWOPILock to avoid race-condition
Change-Id: Ib91f53f4ebbfef8d93cebe24d48fea26df479dfa
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-03 05:17:05 -04:00
Ashod Nakashian b34de7fad1 wsd: move STATE_ENUM to common/StateEnum.hpp
With some minor modifications.

Change-Id: I5bc06bd96bbf201ccaee87170d052b4ad2a6c778
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-06 18:33:45 -04:00
Ashod Nakashian 73c5bdf04e wsd: test: minor cleanup in UnitWOPILock
Change-Id: I945716d314b98af4dbb6dd123e1406e2e6f94db8
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-02-24 07:38:13 -05:00
Ashod Nakashian 08461715cd wsd: test: stabilize UnitWOPILock
Transitioning the state must happen before
fiting the events that require the new state.

This was a source of random failures.

Also, improved other aspects and added
more assertions and logs.

Change-Id: I55d5a7d5f13eeedaff7f309402baaae37b0134d6
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-02-04 10:26:49 -05:00
Ashod Nakashian f4aa05cbf9 test: modernize http response in tests and simplify
And improve some test logs.

Change-Id: Ia65de99b5682abe55f677c6afca40289087f45e5
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-02-04 10:26:49 -05:00
Ashod Nakashian 5cab06bd88 wsd: test: improve lock tests
Change-Id: Ia864e094daf5d794ffdac411d5ea22c98049afa4
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-01-27 12:58:18 +03:00
Andras Timar f07ff8c7e0 rename: remaining lool->cool changes
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib7d4e804bebe52dead8d53b0e0bbaed0f08bf3d0
2021-11-18 14:14:11 +01:00
Mert Tumer b17dc4c789 Unit test for X-WOPI-Lock
Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I68ce373390a71d4df31716a8a2aa98c96dcb9647
2021-11-15 23:18:37 -05:00