Skip to content

Commit 9df7693

Browse files
committed
fix(proxy): [OCISDEV-330] add webdav without trailing slash
Added the `/webdav` endpoint without a trailing slash into the proxy default config. This makes sure that requests to `/webdav` without a trailing slash are handled by ocdav service instead of web service.
1 parent f9c7d91 commit 9df7693

File tree

14 files changed

+52
-100
lines changed

14 files changed

+52
-100
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Bugfix: Add webdav without trailing slash into proxy default config
2+
3+
We've added the `/webdav` endpoint without a trailing slash into the proxy default config.
4+
5+
https://github.com/owncloud/ocis/pull/11677
6+
https://github.com/owncloud/ocis/issues/10346
7+
https://github.com/owncloud/ocis/issues/10334

services/proxy/pkg/config/defaults/defaultconfig.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,10 @@ func DefaultPolicies() []config.Policy {
217217
Endpoint: "/webdav/",
218218
Service: "com.owncloud.web.ocdav",
219219
},
220+
{
221+
Endpoint: "/webdav",
222+
Service: "com.owncloud.web.ocdav",
223+
},
220224
{
221225
Endpoint: "/status",
222226
Service: "com.owncloud.web.ocdav",

tests/acceptance/expected-failures-without-remotephp.md

Lines changed: 1 addition & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -131,72 +131,13 @@
131131
- [coreApiWebdavOperations/search.feature:153](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavOperations/search.feature#L153)
132132
- [coreApiWebdavOperations/search.feature:231](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavOperations/search.feature#L231)
133133

134-
#### [Cannot create new TUS upload resource using /webdav without remote.php - returns html instead](https://github.com/owncloud/ocis/issues/10346)
135-
136-
- [apiSpaces/tusUpload.feature:66](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/tusUpload.feature#L66)
137-
- [apiSpaces/tusUpload.feature:122](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/tusUpload.feature#L122)
138-
- [coreApiWebdavUploadTUS/creationWithUploadExtension.feature:42](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/creationWithUploadExtension.feature#L42)
139-
- [coreApiWebdavUploadTUS/uploadFile.feature:17](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature#L17)
140-
- [coreApiWebdavUploadTUS/uploadFile.feature:18](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature#L18)
141-
- [coreApiWebdavUploadTUS/uploadFile.feature:19](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature#L19)
142-
- [coreApiWebdavUploadTUS/uploadFile.feature:20](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature#L20)
143-
- [coreApiWebdavUploadTUS/uploadFile.feature:21](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature#L21)
144-
- [coreApiWebdavUploadTUS/uploadFile.feature:22](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature#L22)
145-
- [coreApiWebdavUploadTUS/uploadFile.feature:23](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature#L23)
146-
- [coreApiWebdavUploadTUS/uploadFile.feature:48](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature#L48)
147-
- [coreApiWebdavUploadTUS/uploadFile.feature:49](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature#L49)
148-
- [coreApiWebdavUploadTUS/uploadFile.feature:50](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature#L50)
149-
- [coreApiWebdavUploadTUS/uploadFile.feature:51](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature#L51)
150-
- [coreApiWebdavUploadTUS/uploadFile.feature:52](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature#L52)
151-
- [coreApiWebdavUploadTUS/uploadFile.feature:53](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature#L53)
152-
- [coreApiWebdavUploadTUS/uploadFile.feature:54](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature#L54)
153-
- [coreApiWebdavUploadTUS/uploadFile.feature:78](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature#L78)
154-
- [coreApiWebdavUploadTUS/uploadFile.feature:90](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature#L90)
155-
- [coreApiWebdavUploadTUS/uploadFile.feature:103](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature#L103)
156-
- [coreApiWebdavUploadTUS/uploadFile.feature:115](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature#L115)
157-
- [coreApiWebdavUploadTUS/uploadFile.feature:129](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature#L129)
158-
- [coreApiWebdavUploadTUS/uploadFile.feature:141](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature#L141)
159-
- [coreApiWebdavUploadTUS/uploadFile.feature:155](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature#L155)
160-
- [coreApiWebdavUploadTUS/uploadFile.feature:177](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature#L177)
161-
- [coreApiWebdavUploadTUS/uploadFile.feature:200](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature#L200)
162-
- [coreApiWebdavUploadTUS/uploadFile.feature:233](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature#L233)
163-
- [coreApiWebdavUploadTUS/uploadFile.feature:216](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature#L216)
164-
- [coreApiWebdavUploadTUS/uploadFileMtime.feature:17](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFileMtime.feature#L17)
165-
- [coreApiWebdavUploadTUS/uploadFileMtime.feature:29](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFileMtime.feature#L29)
166-
- [coreApiWebdavUploadTUS/uploadFileMtime.feature:42](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFileMtime.feature#L42)
167-
- [coreApiWebdavUploadTUS/uploadFileMtime.feature:55](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFileMtime.feature#L55)
168-
- [coreApiWebdavUploadTUS/uploadFileMtime.feature:70](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFileMtime.feature#L70)
169-
- [coreApiWebdavUploadTUS/uploadFileMtimeShares.feature:30](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFileMtimeShares.feature#L30)
170-
- [coreApiWebdavUploadTUS/uploadFileMtimeShares.feature:50](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFileMtimeShares.feature#L50)
171-
- [coreApiWebdavUploadTUS/uploadFileMtimeShares.feature:72](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFileMtimeShares.feature#L72)
172-
- [coreApiWebdavUploadTUS/uploadFileMtimeShares.feature:93](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFileMtimeShares.feature#L93)
173-
- [coreApiWebdavUploadTUS/uploadToMoveFolder.feature:21](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadToMoveFolder.feature#L21)
174-
- [coreApiWebdavUploadTUS/uploadToNonExistingFolder.feature:19](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadToNonExistingFolder.feature#L19)
175-
- [coreApiWebdavUploadTUS/uploadToNonExistingFolder.feature:36](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadToNonExistingFolder.feature#L36)
176-
- [coreApiWebdavUploadTUS/uploadToNonExistingFolder.feature:62](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadToNonExistingFolder.feature#L62)
177-
- [coreApiWebdavUploadTUS/uploadToShare.feature:30](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadToShare.feature#L30)
178-
- [coreApiWebdavUploadTUS/uploadToShare.feature:51](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadToShare.feature#L51)
179-
- [coreApiWebdavUploadTUS/uploadToShare.feature:74](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadToShare.feature#L74)
180-
- [coreApiWebdavUploadTUS/uploadToShare.feature:96](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadToShare.feature#L96)
181-
- [coreApiWebdavUploadTUS/uploadToShare.feature:116](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadToShare.feature#L116)
182-
183-
#### [PROPFIND to /webdav root (old dav path) without remote.php returns html instead of xml](https://github.com/owncloud/ocis/issues/10334)
184-
185-
- [coreApiAuth/webDavAuth.feature:15](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuth/webDavAuth.feature#L15)
186-
- [coreApiAuth/webDavAuth.feature:25](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuth/webDavAuth.feature#L25)
187-
- [coreApiShareManagementToShares/moveReceivedShare.feature:49](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/moveReceivedShare.feature#L49)
188-
- [coreApiShareManagementToShares/moveReceivedShare.feature:130](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/moveReceivedShare.feature#L130)
189-
- [coreApiShareManagementToShares/moveReceivedShare.feature:129](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/moveReceivedShare.feature#L129)
190-
- [coreApiWebdavOperations/propfind.feature:25](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavOperations/propfind.feature#L25)
191-
- [coreApiWebdavOperations/propfind.feature:26](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavOperations/propfind.feature#L26)
192-
- [coreApiWebdavOperations/propfind.feature:36](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavOperations/propfind.feature#L36)
193-
194134
#### [Trying to create .. resource with /webdav root (old dav path) without remote.php returns html](https://github.com/owncloud/ocis/issues/10339)
195135

196136
- [coreApiWebdavProperties/createFileFolder.feature:176](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature#L176)
197137
- [coreApiWebdavProperties/createFileFolder.feature:177](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature#L177)
198138
- [coreApiWebdavProperties/createFileFolder.feature:196](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature#L196)
199139
- [coreApiWebdavProperties/createFileFolder.feature:197](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature#L197)
140+
- [coreApiWebdavUploadTUS/uploadFile.feature:177](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature#L177)
200141

201142
Note: always have an empty line at the end of this file.
202143
The bash script that processes this file requires that the last line has a newline on the end.

tests/acceptance/features/apiSpaces/tusUpload.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Feature: upload resources using TUS protocol
4242
| test.txt |
4343
| upload.txt |
4444

45-
@issue-10346
45+
4646
Scenario Outline: upload a zero-byte file inside a shared folder
4747
Given using <dav-path-version> DAV path
4848
And user "Brian" has been created with default attributes
@@ -98,7 +98,7 @@ Feature: upload resources using TUS protocol
9898
| Access-Control-Expose-Headers | Tus-Resumable, Upload-Offset, Location |
9999
And for user "Alice" the content of the file "textfile.txt" of the space "new-space" should be ""
100100

101-
@issue-8003 @issue-10346
101+
@issue-8003
102102
Scenario Outline: replace a shared file with zero-byte file
103103
Given using <dav-path-version> DAV path
104104
And user "Brian" has been created with default attributes

tests/acceptance/features/coreApiAuth/webDavAuth.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Feature: auth
66
Background:
77
Given user "Alice" has been created with default attributes
88

9-
@smokeTest @issue-10334
9+
@smokeTest
1010
Scenario Outline: using WebDAV anonymously
1111
When a user requests "<dav-path>" with "PROPFIND" and no authentication
1212
Then the HTTP status code should be "401"
@@ -16,7 +16,7 @@ Feature: auth
1616
| /dav/files/%username% |
1717
| /dav/spaces/%spaceid% |
1818

19-
@smokeTest @issue-10334
19+
@smokeTest
2020
Scenario Outline: using WebDAV with basic auth
2121
When user "Alice" requests "<dav-path>" with "PROPFIND" using basic auth
2222
Then the HTTP status code should be "207"

tests/acceptance/features/coreApiShareManagementToShares/moveReceivedShare.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Feature: sharing
99
| Brian |
1010
| Carol |
1111

12-
@issue-8242 @issue-10334
12+
@issue-8242
1313
Scenario Outline: sharer renames the shared item (old/new webdav)
1414
Given user "Alice" has uploaded file with content "foo" to "sharefile.txt"
1515
And using <dav-path-version> DAV path
@@ -88,7 +88,7 @@ Feature: sharing
8888
| dav-path | dav-path-personal |
8989
| /dav/spaces/%shares_drive_id% | /dav/spaces/%spaceid% |
9090

91-
@issue-8242 @issue-10334 @env-config
91+
@issue-8242 @env-config
9292
Scenario Outline: share receiver renames the shared item (old/new webdav)
9393
Given user "Alice" has uploaded file with content "foo" to "/sharefile.txt"
9494
And the administrator has enabled the permissions role "Secure Viewer"

tests/acceptance/features/coreApiWebdavOperations/propfind.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Feature: PROPFIND
1313
| /dav/files |
1414
| /dav/spaces |
1515

16-
@issue-10334
16+
1717
Scenario Outline: send PROPFIND request to "/dav/(files|spaces)" with depth header
1818
Given user "Alice" has been created with default attributes
1919
When user "Alice" requests "<dav-path>" with "PROPFIND" using basic auth and with headers

tests/acceptance/features/coreApiWebdavUploadTUS/creationWithUploadExtension.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Feature: tests of the creation extension see https://tus.io/protocols/resumable-
2828
| new |
2929
| spaces |
3030

31-
@issue-10346
31+
3232
Scenario Outline: creating a new resource and upload data in multiple bytes using creation with upload extension
3333
Given using <dav-path-version> DAV path
3434
When user "Alice" creates file "textFile.txt" and uploads content "12345" in the same request using the TUS protocol on the WebDAV API

tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Feature: upload file
66
Background:
77
Given user "Alice" has been created with default attributes
88

9-
@issue-10346
9+
1010
Scenario Outline: upload a file and check download content
1111
Given using <dav-path-version> DAV path
1212
When user "Alice" uploads file with content "uploaded content" to "<file-name>" using the TUS protocol on the WebDAV API
@@ -36,7 +36,7 @@ Feature: upload file
3636
| spaces | /?fi=le&%#2 . txt |
3737
| spaces | /# %ab ab?=ed |
3838

39-
@issue-10346
39+
4040
Scenario Outline: upload a file into a folder and check download content
4141
Given using <dav-path-version> DAV path
4242
And user "Alice" has created folder "<folder-name>"
@@ -67,7 +67,7 @@ Feature: upload file
6767
| spaces | /folder ?2.txt | file ?2.txt |
6868
| spaces | /?fi=le&%#2 . txt | # %ab ab?=ed |
6969

70-
@issue-10346
70+
7171
Scenario Outline: upload chunked file with TUS
7272
Given using <dav-path-version> DAV path
7373
When user "Alice" uploads file with content "uploaded content" in 3 chunks to "/myChunkedFile.txt" using the TUS protocol on the WebDAV API
@@ -79,7 +79,7 @@ Feature: upload file
7979
| new |
8080
| spaces |
8181

82-
@issue-10346
82+
8383
Scenario Outline: upload 1 byte chunks with TUS
8484
Given using <dav-path-version> DAV path
8585
When user "Alice" uploads file with content "0123456789" in 10 chunks to "/myChunkedFile.txt" using the TUS protocol on the WebDAV API
@@ -91,7 +91,7 @@ Feature: upload file
9191
| new |
9292
| spaces |
9393

94-
@issue-10346
94+
9595
Scenario Outline: upload to overwriting a file
9696
Given using <dav-path-version> DAV path
9797
And user "Alice" has uploaded file with content "original content" to "textfile.txt"
@@ -104,7 +104,7 @@ Feature: upload file
104104
| new |
105105
| spaces |
106106

107-
@issue-10346
107+
108108
Scenario Outline: upload a file and no version is available
109109
Given using <dav-path-version> DAV path
110110
When user "Alice" uploads file with content "uploaded content" to "/upload.txt" using the TUS protocol on the WebDAV API
@@ -116,7 +116,7 @@ Feature: upload file
116116
| new |
117117
| spaces |
118118

119-
@issue-10346
119+
120120
Scenario Outline: upload a file twice and versions are available
121121
Given using <dav-path-version> DAV path
122122
When user "Alice" uploads file with content "uploaded content" to "/upload.txt" using the TUS protocol on the WebDAV API
@@ -130,7 +130,7 @@ Feature: upload file
130130
| new |
131131
| spaces |
132132

133-
@issue-10346
133+
134134
Scenario Outline: upload a file in chunks with TUS and no version is available
135135
Given using <dav-path-version> DAV path
136136
When user "Alice" uploads file with content "0123456789" in 10 chunks to "/myChunkedFile.txt" using the TUS protocol on the WebDAV API
@@ -142,7 +142,7 @@ Feature: upload file
142142
| new |
143143
| spaces |
144144

145-
@issue-10346
145+
146146
Scenario Outline: upload a twice file in chunks with TUS and versions are available
147147
Given using <dav-path-version> DAV path
148148
When user "Alice" uploads file with content "0123456789" in 10 chunks to "/myChunkedFile.txt" using the TUS protocol on the WebDAV API
@@ -156,7 +156,7 @@ Feature: upload file
156156
| new |
157157
| spaces |
158158

159-
@issue-10334
159+
160160
Scenario Outline: upload a file with invalid-name
161161
Given using <dav-path-version> DAV path
162162
When user "Alice" creates a new TUS resource on the WebDAV API with these headers:
@@ -186,7 +186,7 @@ Feature: upload file
186186
| spaces | "my\\file" | bXkMaWxl |
187187
| spaces | ".." | Li4= |
188188

189-
@issue-10346
189+
190190
Scenario Outline: upload a zero-byte file
191191
Given using <dav-path-version> DAV path
192192
When user "Alice" uploads file "filesForUpload/zerobyte.txt" to "textfile.txt" using the TUS protocol on the WebDAV API
@@ -201,7 +201,7 @@ Feature: upload file
201201
| new |
202202
| spaces |
203203

204-
@issue-8003 @issue-10346
204+
@issue-8003
205205
Scenario Outline: replace a file with zero-byte file
206206
Given using <dav-path-version> DAV path
207207
And user "Alice" has uploaded file with content "This is TUS upload" to "textfile.txt"
@@ -217,7 +217,7 @@ Feature: upload file
217217
| new |
218218
| spaces |
219219

220-
@issue-8003 @issue-10346
220+
@issue-8003
221221
Scenario Outline: replace a file inside a folder with zero-byte file
222222
Given using <dav-path-version> DAV path
223223
And user "Alice" has created folder "testFolder"

0 commit comments

Comments
 (0)