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.

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

2 participants