-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(decomposedfs): check checksum in WriteChunk
Signed-off-by: jkoberg <[email protected]>
- Loading branch information
Showing
8 changed files
with
90 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# The test runner source for API tests | ||
APITESTS_COMMITID=37491c15674ab02347cbf6c90124002e75afa339 | ||
APITESTS_COMMITID=5120b86d92f69c04f999697f7b584379327d62cb | ||
APITESTS_BRANCH=master | ||
APITESTS_REPO_GIT_URL=https://github.com/owncloud/ocis.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Enhancement: Tusd PATCH checksums | ||
|
||
Check checksums also on chunked uploads during PATCH requests | ||
|
||
https://github.com/cs3org/reva/pull/4807 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package ctx | ||
|
||
import "context" | ||
|
||
// ContextGetChecksum returns the checksum if set in the given context. | ||
func ContextGetChecksum(ctx context.Context) (string, bool) { | ||
u, ok := ctx.Value(checksumKey).(string) | ||
return u, ok | ||
} | ||
|
||
// ContextWithChecksum returns the checksum if set in the given context. Otherwise it panics. | ||
func ContextMustGetChecksum(ctx context.Context) string { | ||
u, ok := ctx.Value(checksumKey).(string) | ||
if !ok { | ||
panic("checksum not set in context") | ||
} | ||
return u | ||
} | ||
|
||
// ContextSetChecksum returns a new context with the given checksum. | ||
func ContextSetChecksum(ctx context.Context, checksum string) context.Context { | ||
return context.WithValue(ctx, checksumKey, checksum) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters