Skip to content

Conversation

@calvincestari
Copy link
Member

Fixes apollographql/apollo-ios#3612

The multipart chunking logic would throw a parsing error if there was any data after the close delimiter; a close delimiter signals that the multipart stream is finished and we can safely ignore anything beyond it.

@netlify
Copy link

netlify bot commented Nov 26, 2025

Deploy Preview for apollo-ios-docc canceled.

Name Link
🔨 Latest commit 183b7ce
🔍 Latest deploy log https://app.netlify.com/projects/apollo-ios-docc/deploys/69273e537f84de00085f2da4

@apollo-librarian
Copy link

apollo-librarian bot commented Nov 26, 2025

✅ Docs preview has no changes

The preview was not built because there were no changes.

Build ID: 420143e82174794efcba033b
Build Logs: View logs

@calvincestari calvincestari changed the title fix: /multipart buffer separate chunk parsing fix: Multipart chunk parsing Nov 26, 2025
@calvincestari calvincestari changed the title fix: Multipart chunk parsing fix: Multipart close delimiter parsing Nov 26, 2025
}

if buffer == Constants.CloseDelimeter {
if buffer.starts(with: Constants.CloseDelimiter) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the crux of the fix.

@calvincestari calvincestari merged commit 7d619ee into main Dec 2, 2025
21 checks passed
@calvincestari calvincestari deleted the fix/multipart-buffer-separate-chunk-parsing branch December 2, 2025 19:55
BobaFetters pushed a commit that referenced this pull request Dec 2, 2025
BobaFetters pushed a commit to apollographql/apollo-ios that referenced this pull request Dec 2, 2025
BobaFetters pushed a commit that referenced this pull request Dec 2, 2025
62377ef26 fix: Multipart close delimiter parsing (#852)

git-subtree-dir: apollo-ios
git-subtree-split: 62377ef26f2fb828f66bb994379d3c2c9c24cae8
BobaFetters pushed a commit that referenced this pull request Dec 2, 2025
git-subtree-dir: apollo-ios
git-subtree-mainline: b02afe7
git-subtree-split: 62377ef26f2fb828f66bb994379d3c2c9c24cae8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MultipartResponseDeferParser in V2 fails to parse close delimiter in at least some cases

3 participants