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

transport replaceVars url escape values #3347

Closed
wants to merge 1 commit into from

Conversation

odedniv
Copy link

@odedniv odedniv commented Mar 31, 2019

Fixes #2895

According to https://cloud.google.com/storage/docs/json_api/#encoding URI paths parts are supposed to be encoded.

For example in google_storage_object_access_control if the object name contains a /, the request will fail with:

* google_storage_object_access_control.public_rule: Error creating ObjectAccessControl: googleapi: got HTTP response code 404 with body: Not Found

To my knowledge, replaceVars() is specifically for replacing variables in URLs (as for the name of the parameter "linkTmpl"), so I'm assuming this would work globally.

@ghost ghost added the size/xs label Mar 31, 2019
@odedniv
Copy link
Author

odedniv commented May 5, 2019

It contains conflicts now because 966229a allowed adding % to variable names in order to URL encode them, but I believe it should always URL encode them because replaceVars is used specifically for URLs.

@odedniv
Copy link
Author

odedniv commented May 6, 2019

Maybe closed by GoogleCloudPlatform/magic-modules#1717 (if I understand the repo structure correctly)

@odedniv
Copy link
Author

odedniv commented May 13, 2019

Not relevant as discussed in GoogleCloudPlatform/magic-modules#1717

@odedniv odedniv closed this May 13, 2019
@ghost
Copy link

ghost commented Jun 12, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Jun 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some google_storage_* resources don't encode object names properly
1 participant