cloudyr / googleCloudStorageR

Google Cloud Storage API to R
https://code.markedmondson.me/googleCloudStorageR
Other
104 stars 29 forks source link

Remove trailing slash from `/b` and `/o` URLs #182

Closed manuteleco closed 1 year ago

manuteleco commented 1 year ago

Bucket list and insert operations have URL paths ending in /b. Likewise, object list and insert operations have URL paths ending in /o.

googleCloudStorageR was invoking these operations with a trailing slash (/b/ and /o/, respectively). This worked because the Google Cloud Storage API seems to be lenient here. However, they still are undocumented URLs that simply happen to work, which can lead to unexpected issues. For example, it breaks compatibility with GCS emulators that might only implement the official API.

This commit adjusts the request URLs for these operations so that they match the documented ones (i.e., path ending in /b and /o, instead of /b/ and /o/).


Closes #178

MarkEdmondson1234 commented 1 year ago

Sure, long standing issue from when I didn't know better ;)