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

drive: rewrite Location headers #11798

Merged
merged 1 commit into from
Apr 18, 2024
Merged

drive: rewrite Location headers #11798

merged 1 commit into from
Apr 18, 2024

Conversation

oxtoacart
Copy link
Contributor

This ensures that MOVE, LOCK and any other verbs that use the Location header work correctly.

Fixes #11758

This ensures that MOVE, LOCK and any other verbs that use the Location
header work correctly.

Fixes #11758

Signed-off-by: Percy Wegmann <percy@tailscale.com>
@oxtoacart oxtoacart requested a review from catzkorn April 18, 2024 17:11
childName := pathComponents[0]
child := h.GetChild(childName)
if child == nil {
w.WriteHeader(http.StatusNotFound)
return childName
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Drive-by, we don't actually use this return value.

@@ -35,6 +36,16 @@ func Join(parts ...string) string {
return path.Join(fullParts...)
}

// JoinEscaped is like Join but path escapes each part.
func JoinEscaped(parts ...string) string {
Copy link
Member

Choose a reason for hiding this comment

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

Nice!

@oxtoacart oxtoacart merged commit 787f8c0 into main Apr 18, 2024
48 checks passed
@oxtoacart oxtoacart deleted the ox/issue11758 branch April 18, 2024 20:50
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.

MOVE verb does not work with Taildrive
2 participants