mirror of
https://github.com/1f349/go-webdav.git
synced 2024-12-22 08:14:15 +00:00
internal: fix ETag.String returning unquoted string
This commit is contained in:
parent
25678476db
commit
69d8cf54ff
@ -356,12 +356,12 @@ func (etag *ETag) UnmarshalText(b []byte) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (etag *ETag) MarshalText() ([]byte, error) {
|
func (etag ETag) MarshalText() ([]byte, error) {
|
||||||
return []byte(fmt.Sprintf("%q", *etag)), nil
|
return []byte(etag.String()), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (etag ETag) String() string {
|
func (etag ETag) String() string {
|
||||||
return string(etag)
|
return fmt.Sprintf("%q", string(etag))
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://tools.ietf.org/html/rfc4918#section-14.5
|
// https://tools.ietf.org/html/rfc4918#section-14.5
|
||||||
|
Loading…
Reference in New Issue
Block a user