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

Percent-encode object names in ContextUnlock #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ryandv
Copy link

@ryandv ryandv commented Jun 23, 2020

At present, gcslock percent-encodes object names when submitting requests to the Google Cloud Storage API to create new lockfiles. However, it does not apply the same percent-encoding when issuing DELETE requests to release locks.

As a result, when a new mutex is created with an object name containing a / character (to specify a subdirectory in which the lockfiles will be held), gcslock is able to create the lockfile within the subdirectory but not delete it.

This PR url.PathEscapes object names in ContextUnlock to ensure that objects created by ContextLock within a subdirectory can be found and deleted by ContextUnlock.

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.

1 participant