Skip to content

Commit

Permalink
Use oc-etag instead of etag (#6952)
Browse files Browse the repository at this point in the history
* Use oc-etag instead of etag

* Bump sdk
  • Loading branch information
Jan authored May 12, 2022
1 parent 86ad2a3 commit 9f94ad0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Bugfix: Use OC-ETag instead of ETag in text editor app

We've fixed a bug, where the ETag instead of OC-ETag in the text editor app was used,
due to server encoding, the ETag might be manipulated and contain the gzip suffix on a large text file.
Saving the respective file, might cause an error, as the sent ETag doesn't match the server's ETag.

https://github.com/owncloud/web/pull/6952
https://github.com/owncloud/web/issues/6947
https://github.com/owncloud/web/issues/4605
5 changes: 2 additions & 3 deletions packages/web-app-text-editor/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default {
.getFileContents(filePath)
.then((response) => {
serverContent.value = currentContent.value = response.body
currentETag.value = response.headers.ETag
currentETag.value = response.headers['OC-ETag']
return response
})
}).restartable()
Expand All @@ -116,8 +116,7 @@ export default {
.then(
(response) => {
serverContent.value = newContent
// FIXME: above we need response.headers.ETag, here we need response ETag - feels inconsistent
currentETag.value = response.ETag
currentETag.value = response['OC-ETag']
},
(error) => {
switch (error.statusCode) {
Expand Down
2 changes: 1 addition & 1 deletion packages/web-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"marked": "^4.0.12",
"oidc-client": "1.11.5",
"owncloud-design-system": "^13.1.0-rc.5",
"owncloud-sdk": "~3.0.0-alpha.8",
"owncloud-sdk": "~3.0.0-alpha.9",
"p-queue": "^6.1.1",
"popper-max-size-modifier": "^0.2.0",
"portal-vue": "^2.1.7",
Expand Down
13 changes: 8 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9635,9 +9635,9 @@ __metadata:
languageName: node
linkType: hard

"owncloud-sdk@npm:~3.0.0-alpha.8":
version: 3.0.0-alpha.8
resolution: "owncloud-sdk@npm:3.0.0-alpha.8"
"owncloud-sdk@npm:~3.0.0-alpha.9":
version: 3.0.0-alpha.9
resolution: "owncloud-sdk@npm:3.0.0-alpha.9"
peerDependencies:
axios: ^0.26.0
cross-fetch: ^3.0.6
Expand All @@ -9647,7 +9647,10 @@ __metadata:
uuid: ^8.2.0
webdav: 4.9.0
xml-js: ^1.6.11
checksum: 96e09c641010a9356bba63e5fe8aa259cf54279a8bb2c3ae81653f5d9e5598acd4050be707477229c6e53cd7c9d798d451c455182e0160d452738249ecf03c63
dependenciesMeta:
"@pact-foundation/pact":
built: true
checksum: 4ef6bcfc68c59739d40f09c18d34a9116e3e24930e3f659c0738900c6e00cf68c09083012da1deb619b31dbd7561d83006ca9c0fa120068bcd26409029b982f9
languageName: node
linkType: hard

Expand Down Expand Up @@ -13692,7 +13695,7 @@ __metadata:
marked: ^4.0.12
oidc-client: 1.11.5
owncloud-design-system: ^13.1.0-rc.5
owncloud-sdk: ~3.0.0-alpha.8
owncloud-sdk: ~3.0.0-alpha.9
p-queue: ^6.1.1
popper-max-size-modifier: ^0.2.0
portal-vue: ^2.1.7
Expand Down

0 comments on commit 9f94ad0

Please sign in to comment.