-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
webdav: allow the user to override the ETag and ContentType properties
Before this commit it was not possible to override the the ContentType and ETag properties. Since these properties aren't directly read from the os.FileInfo objects returned by the FileSystem it seems reasonable that the user might have a different policy for computing them. For instance the underlying FileSystem may already know the ContentType or want to use an MD5 Hash for the ETag. This commit introduces two new optional interfaces ETager and ContentTyper which, when defined on the os.FileInfo objects returned by the FileSystem methods, allows the user of this library to override the ETag and ContentType generation. Fixes golang/go#22577 Change-Id: Ib42e126db3fcc0a93463e61db85fde59be85cca5 Reviewed-on: https://go-review.googlesource.com/109217 Reviewed-by: Brad Fitzpatrick <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
- Loading branch information
Showing
2 changed files
with
156 additions
and
0 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
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