Skip to content

Fix semicolon parsing in ContentDisposition - #205

Merged
czechboy0 merged 10 commits into
apple:mainfrom
kukushechkin:correctly-parse-content-disposition
Sep 2, 2026
Merged

Fix semicolon parsing in ContentDisposition#205
czechboy0 merged 10 commits into
apple:mainfrom
kukushechkin:correctly-parse-content-disposition

Conversation

@kukushechkin

Copy link
Copy Markdown
Contributor

Motivation

Unconditional split at ; splits filename value into multiple (usually broken) params.

Modifications

Correctly track quotes in ContentDisposition param and inly split params at high-level semicolon.

Result

Filenames with semicolons are parsed correctly.

Test Plan

Unit tests.

@kukushechkin kukushechkin added the 🔨 semver/patch No public API change. label Jul 29, 2026
@czechboy0 czechboy0 self-assigned this Aug 7, 2026
Comment thread Sources/OpenAPIRuntime/Base/ContentDisposition.swift Outdated
Comment thread Sources/OpenAPIRuntime/Base/ContentDisposition.swift Outdated
Comment thread Sources/OpenAPIRuntime/Base/ContentDisposition.swift Outdated
Comment thread Sources/OpenAPIRuntime/Base/ContentDisposition.swift Outdated
Comment thread Sources/OpenAPIRuntime/Base/ContentDisposition.swift Outdated
Comment thread Sources/OpenAPIRuntime/Base/ContentDisposition.swift Outdated
Comment thread Tests/OpenAPIRuntimeTests/Multipart/Test_MultipartValidationSequence.swift Outdated
@czechboy0 czechboy0 assigned kukushechkin and unassigned czechboy0 Aug 25, 2026
Comment thread Sources/OpenAPIRuntime/Base/ContentDisposition.swift Outdated

@czechboy0 czechboy0 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one more nit, and please rerun format, the CI is failing.

@czechboy0 czechboy0 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more nit, sorry

Comment thread Sources/OpenAPIRuntime/Base/ContentDisposition.swift Outdated
Co-authored-by: Honza Dvorsky <honza@apple.com>
@czechboy0
czechboy0 enabled auto-merge (squash) September 2, 2026 07:56
@czechboy0
czechboy0 merged commit 9e53df5 into apple:main Sep 2, 2026
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants