Mola-maker opened a new pull request, #9290:
URL: https://github.com/apache/opendal/pull/9290
Closes #9285
## Why
`parse_multipart_boundary` returned the rest of the header after
`boundary=`. A later parameter or a pair of quotes became part of the delimiter.
## What changed
The parser stops an unquoted value at `;` and takes a quoted value through
the closing quote. A GCS boundary that contains `=` and has no later parameter
is unchanged.
## Scope
`parse_multipart_boundary` in `opendal-core`.
## Tradeoffs
Whitespace around `=` is still not accepted. Existing callers do not send it.
## Blast Radius
Batch responses whose `Content-Type` has a quoted boundary or another
parameter after `boundary`.
## Verification
On `af89110`, `cargo test -p opendal-core --lib
test_parse_multipart_boundary` returned `Some("gc0p4Jq0M2Yt08jU534c0p;
charset=utf-8")`. After this change the boundary tests and the existing
multipart mixed tests pass.
# Rationale for this change
The delimiter has to match the boundary line in the body.
# What changes are included in this PR?
Stop at the next parameter, strip one pair of quotes, and cover both cases.
# Are there any user-facing changes?
Batch delete and metadata responses with extra `Content-Type` parameters can
parse.
# Breaking changes
None.
# AI Usage Statement
- Harness: Cursor Cloud Agent
- Model: Grok 4.7
- Effort: high
- Role: Reproduced the parser output on current main, wrote the failing
cases, and changed the parameter split. No live service call.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]