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

Certain API URLs contain a trailing whitespace that is not documented #178

Closed
manuteleco opened this issue Jul 23, 2023 · 2 comments · Fixed by #182
Closed

Certain API URLs contain a trailing whitespace that is not documented #178

manuteleco opened this issue Jul 23, 2023 · 2 comments · Fixed by #182

Comments

@manuteleco
Copy link
Contributor

This is an observation of something I've encountered when working on #176. It's not a critical issue; whether or not it requires action is for you to decide. So feel free to just close this issue if you believe no adjustments are required.

On GCS API methods that use URLs ending with /o or /b, googleCloudStorageR will actually perform requests to /o/ and /b/ instead. It adds an extra trailing slash to the path. This obviously still works fine in practice, as Google seems to be lenient here. But its official documentation doesn't say anything about supporting that trailing slash. For example, see the reference document for the Objects: insert operation.

Despite working with the real GCS, the fact that googleCloudStorageR relies on URLs that are undocumented can still lead to other minor issues. For example, it might not work out of the box with GCS emulators unless they are given explicit support for the undocumented routes, like in fsouza/fake-gcs-server#1252.

@MarkEdmondson1234
Copy link
Collaborator

There is actually an option to remove the check for a trailing space, I remember it came up off and on which Google APIs supported it or not https://github.com/MarkEdmondson1234/googleAuthR/blob/3e77935ec7dcb205b8f93110c9f5d7306ae0938d/R/generator.R#L13

@manuteleco
Copy link
Contributor Author

Thanks, I hadn't noticed that option. Together with another minor adjustment, I managed to remove the trailing slash from the URLs I mentioned.

I'll wait for #177 to be merged before opening a PR, in order to avoid conflicts.

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 a pull request may close this issue.

2 participants