Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow having an empty last part in multipart #4598

Merged
merged 2 commits into from
Jan 13, 2023

Conversation

BoD
Copy link
Contributor

@BoD BoD commented Dec 23, 2022

Related to #4596.
See also dotansimha/graphql-yoga#2243

@netlify
Copy link

netlify bot commented Dec 23, 2022

Deploy Preview for apollo-android-docs canceled.

Name Link
🔨 Latest commit 2fe7018
🔍 Latest deploy log https://app.netlify.com/sites/apollo-android-docs/deploys/63b2e475d69d5700088f4f08

@@ -110,6 +110,14 @@ class MultipartReader constructor(
when (source.select(afterBoundaryOptions)) {
0 -> {
// "\r\n": We've found a new part.
if (source.select(Options.of("--$boundary--".encodeUtf8())) == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be done at the same time as the other select? Looks like creating Options could be expensive so I wouldn't want to create too many?

Copy link
Contributor

@martinbonnin martinbonnin left a comment

Choose a reason for hiding this comment

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

LGTM modulo the select thing. Maybe let's wait a bit see what graphql-yoga has to say about it?

Copy link
Contributor

@martinbonnin martinbonnin left a comment

Choose a reason for hiding this comment

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

@BoD BoD merged commit 7e4550a into main Jan 13, 2023
@BoD BoD deleted the multipart-allow-final-empty-part branch January 13, 2023 09:03
BoD added a commit that referenced this pull request Jan 13, 2023
@martinbonnin martinbonnin mentioned this pull request Mar 15, 2023
@martinbonnin martinbonnin mentioned this pull request Apr 3, 2023
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.

2 participants