[REQUIRED] Step 2: Describe your environment
- Operating System version: macOS Monterey
- Firebase SDK version: 9.4.1
- Firebase Product: Firestore
- Node.js version: v16.13.0
- NPM version: 8.1.0
- Library: React
[REQUIRED] Step 3: Describe the problem
An Invalid HTTP method/URL pair error is displayed when I try to request an image from Firebase Storage if the picture is inside a folder, for example images/image name.png. However, the request is successful if the image is not contained in a folder. The problem is the result of some encoding that was done, possibly as a result of the presence of the %2F in the url while the image is inside a folder.
(I removed https:// here to not create a link)
This works
"firebasestorage.googleapis.com/v0/b/[BUCKET]/o/SOME_FOLDER%2F[image_name.jpg]?alt=media"
This doesnt work
"firebasestorage.googleapis.com/v0/b/[BUCKET]/o/SOME_FOLDER/[image_name.jpg]?alt=media"
This type of url without folder and the %2F works fine.
"firebasestorage.googleapis.com/v0/b/[BUCKET]/o/[image_name.jpg]?alt=media"
To Reproduce
Just upload an image to firebase storage FOLDER, add the request for that image url and test on browser.
Expected behavior
The request should succeed when url contains %2F.
This was also an issue among Android devides.