The generated URL contains zero-chars. The problem is probably here: https://github.com/GoogleCloudPlatform/gcloud-java/compare/master...clementdenis:patch-1 The method should either reject object names leading slash, or handle them correctly.