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

Fix post MultiPart #47006

Merged
merged 5 commits into from
Jan 26, 2022
Merged

Fix post MultiPart #47006

merged 5 commits into from
Jan 26, 2022

Conversation

m-kuhn
Copy link
Member

@m-kuhn m-kuhn commented Jan 25, 2022

This reverts commit c62a255.

Calling readAll() on outgoingData breaks multipart post requests.

Fixes #46989

@github-actions github-actions bot added this to the 3.24.0 milestone Jan 25, 2022
Copy link
Contributor

@nirvn nirvn left a comment

Choose a reason for hiding this comment

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

I also confirm removing the block fixed things.

Hurrah for the additional test.

@m-kuhn m-kuhn changed the title Revert "Set content also when there is no buffer" Fix post MultiPart Jan 26, 2022
@elpaso
Copy link
Contributor

elpaso commented Jan 26, 2022

Can you please wait to merge?

You have disabled a test about another problem that this code was fixing.

@m-kuhn
Copy link
Member Author

m-kuhn commented Jan 26, 2022

Happy to wait for you @elpaso

@m-kuhn
Copy link
Member Author

m-kuhn commented Jan 26, 2022

@elpaso can you be more precise about the problem?
This pull request avoids reading the complete request into memory prior to sending it:

  • depending on the QIODevice acting as source, this can only be read once. This is the main problem being fixed here.
  • If the request is submitting a huge file, this blows up memory usage unnecessarily
  • Downside: we don't have the complete request in the debugger and other code external code, but I don't think that is how Qt meant this to work

Copy link
Contributor

@elpaso elpaso left a comment

Choose a reason for hiding this comment

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

LGTM, I checked the action manually and it works as expected, I added that piece of code to be able to test the action but obviously it had unwanted side effects.

@m-kuhn m-kuhn force-pushed the multipart branch 2 times, most recently from aea92d3 to b7157db Compare January 26, 2022 15:55
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.

MultiPart post network request stopped working
3 participants