Skip to content

Commit df0d041

Browse files
committed
test: demonstrate multipart array encoding bug with empty bracket indices
The SDK's addFormValue uses `key + '[]'` for arrays, producing field names like `files[][dest_path]` and `files[][file]` instead of `files[0][dest_path]` and `files[0][file]`. Without numeric indices, a server cannot: 1. Parse the field names (strconv.Atoi("") fails on empty brackets) 2. Pair file contents with their destination paths for multi-file uploads These tests use a mock HTTP server with busboy to capture and inspect the actual multipart field names the SDK produces. Affected endpoints: - fs.upload (files array) - browsers.loadExtensions (extensions array) Made-with: Cursor
1 parent 5302205 commit df0d041

3 files changed

Lines changed: 6803 additions & 1 deletion

File tree

0 commit comments

Comments
 (0)