8000 Remove potential quotes around If-Match value by bitfehler · Pull Request #114 · emersion/go-webdav · GitHub
[go: up one dir, main page]

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

Remove potential quotes around If-Match value #114

Merged
merged 1 commit into from
Nov 22, 2022

Conversation

bitfehler
Copy link
Collaborator

If the If-Match header is an ETag, the ETag is quoted. Remove the quotes so that the application does not have to deal with this.

Also, add a comment that If-None-Match can potentially be an ETag. This does not seem to be commonly used, though.

caldav/server.go Outdated Show resolved Hide resolved
@bitfehler bitfehler force-pushed the bitfehler/if-match-quotes branch from 864e543 to 8828929 Compare November 15, 2022 13:52
internal/elements.go Outdated Show resolved Hide resolved
carddav/server.go Outdated Show resolved Hide resolved
@bitfehler bitfehler force-pushed the bitfehler/if-match-quotes branch from 8828929 to 4de76a4 Compare November 15, 2022 16:00
elements.go Outdated Show resolved Hide resolved
elements.go Outdated Show resolved Hide resolved
@emersion
Copy link
Owner

Other than that nitpick, LGTM!

The `If-Match` and `If-None-Match` conditional headers can have either a
wildcard or a (quoted) ETag as value. However, the ETag _could_ be a
literal `*`, so care must be taken to allow these cases to be
distinguished. The values of these headers have to be handled by the
backend, so export a type that facilitates working with these values.
@bitfehler bitfehler force-pushed the bitfehler/if-match-quotes branch from 4de76a4 to 9db3597 Compare November 22, 2022 10:39
Copy link
Owner
@emersion emersion left a comment

Choose a reason for hiding this comment

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

Thanks!

@emersion emersion merged commit ac9af45 into emersion:master Nov 22, 2022
@bitfehler bitfehler deleted the bitfehler/if-match-quotes branch November 22, 2022 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0