cf r2 objects put percent-encodes '/' in the object key, contrary to its help text (1.0.0-beta.5)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 72/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- cli
Direzione di ricerca
Start at the cf r2 objects put URL construction and compare its dry-run output with the command's help text and schema. Check how path parameters containing / are encoded, and whether other commands share that behavior. Done means the dry-run URL preserves the object key's slashes as required, with the behavior verified against the issue's reproduction.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
cf r2 objects put --help says:
Slashes (
/) within the key MUST be sent literally and MUST NOT be percent-encoded (i.e.%2F)
But the request cf builds percent-encodes them.
Versions
cf 1.0.0-beta.5, Linux
Repro
$ CLOUDFLARE_ACCOUNT_ID=00000000000000000000000000000000 \
npx cf r2 objects put a/b/c.jpg --bucket-name example-bucket --body x --dry-run
{
"command": "cf r2 objects put",
"method": "PUT",
"url": "https://api.cloudflare.com/client/v4/accounts/00000000000000000000000000000000/r2/buckets/example-bucket/objects/a%2Fb%2Fc.jpg",
"pathParams": { "bucket-name": "example-bucket", "object-key": "a/b/c.jpg" },
"bodyKind": "octet-stream",
"body": "x"
}
cf schema r2 objects put shows the path as /accounts/{account_id}/r2/buckets/{bucket_name}/objects/{object_key}, so the key seems to be encoded like any other path parameter.
Expected
…/objects/a/b/c.jpg, as the help text requires. If the API takes the encoded form literally, objects would be stored as a%2Fb%2Fc.jpg instead of under the a/b/ prefix.
I've only observed this in --dry-run output and haven't confirmed it against a real bucket yet. If the dry-run just displays the URL differently from what is actually sent, the help text or the dry-run output might be worth aligning. Other path-parameter commands whose values can contain / may be affected too.
- Lingua principale
- TypeScript
- Stelle
- 916
- Fork
- 53
- Merge medio
- 23h 17m
- PR unite (30g)
- 220
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cloudflare/cf
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
cloudflare/cf#344 ·
I maintainer di solito rispondono entro 1 giorno
-
upstream
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
cloudflare/cf#262 ·
I maintainer di solito rispondono entro 1 giorno
-
`cf dev` rejects `--port` and `--host` for Vite projects, including the `cf init` templateForse già presa @jamesopstad l’ha presa 14 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
cloudflare/cf#223 · 2 assegnatari ·
I maintainer di solito rispondono entro 1 giorno
-
upstream
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
cloudflare/cf#179 ·
I maintainer di solito rispondono entro 1 giorno
-
OAuth account-token delegation: five groups non-selectable despite explicit first-party CLI consentAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
cloudflare/cf#433 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di cloudflare/cf
Issue simili
-
Plugin: sheet music can't be scrolled by hand before playbackForse già presa @snakajima l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
receptron/jinglescript#51 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 9 giorni
-
clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
openclaw/openclaw#186424 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
chore(worker): five module header comments describe the code from before later issues changed itApertaarea:dev U2-later
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
bentleypark/aiwatch#1824 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Pal-AI-Lab/Coopanion#469 ·
I maintainer di solito rispondono entro 1 giorno