Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use oc-etag instead of etag #6952

Merged
merged 2 commits into from
May 12, 2022

Conversation

AlexAndBear
Copy link
Contributor

@AlexAndBear AlexAndBear commented May 12, 2022

Description

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 large text files.
Saving the respective file, might cause an error, as the sent ETag doesn't match the server's ETag.

Related Issue

Motivation and Context

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • ...

@update-docs
Copy link

update-docs bot commented May 12, 2022

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@@ -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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I removed this comment, as it is intended, above we do a get request to a file (where the headers should contain the etag), while updating a resource the etag is emitted in the payload, which is correct

@ownclouders
Copy link
Contributor

Results for oC10Files1 https://drone.owncloud.com/owncloud/web/25524/17/1

💥 The acceptance tests failed on retry. Please find the screenshots inside ...

webUITextEditor-textFile_feature-L21.png

webUITextEditor-textFile_feature-L21.png

webUITextEditor-textFile_feature-L29.png

webUITextEditor-textFile_feature-L29.png

💥 The acceptance tests pipeline failed. The build has been cancelled.

@AlexAndBear AlexAndBear marked this pull request as ready for review May 12, 2022 10:56
@sonarcloud
Copy link

sonarcloud bot commented May 12, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@pascalwengerter pascalwengerter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

"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":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to be picky here but #6952 should be linked in the "sdk-bump" changelog item then 😬 can be done after this has been merged in a changelog-only PR though (which skips all the tests in CI)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See: #6956

@AlexAndBear AlexAndBear merged commit 9f94ad0 into master May 12, 2022
@delete-merged-branch delete-merged-branch bot deleted the use-oc-etag-instead-of-etag-in-text-editor branch May 12, 2022 11:35
@kulmann kulmann mentioned this pull request May 25, 2022
25 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants