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

Empty file upload fix #2779

Merged
merged 3 commits into from
Aug 27, 2019
Merged

Conversation

sshymko
Copy link
Contributor

@sshymko sshymko commented Aug 26, 2019

  • Distinguish blank file field from empty file contents
  • Fix upload of file with empty contents of zero length
  • Prevent empty temp file creation for blank file field
  • Remove irrelevant MIME type of blank file field
  • Resolve Cannot upload empty file or blank file field #2778 Cannot upload empty file or blank file field

@sshymko
Copy link
Contributor Author

sshymko commented Aug 26, 2019

Tests should cover both blank file field and legitimate upload of file with empty contents.
Blank form field submitted by a browser needs to be emulated via cURL.

@sshymko sshymko force-pushed the file_upload_blank_fix branch 2 times, most recently from 62d18c6 to 0274c19 Compare August 26, 2019 18:03
@sshymko sshymko changed the title Fix metadata of blank file upload Fix empty/blank file upload Aug 26, 2019
@sshymko sshymko force-pushed the file_upload_blank_fix branch 3 times, most recently from b13f515 to 5ca0dbe Compare August 26, 2019 19:04
- Distinguish blank file field from empty file contents
- Fix inability to upload empty file of zero size
- Prevent empty temp file creation for blank file field
- Remove irrelevant MIME type of blank file field
- Resolve swoole#2778 Cannot upload empty file or blank file field
- Cover upload of empty file of zero size with tests
- Cover form submission of blank file field with tests
- Resolve swoole#2778 Cannot upload empty file or blank file field
- Fix emulation of blank file field upload
- Replace cURL file uploader with raw socket
- Resolve swoole#2778 Cannot upload empty file or blank file field
@sshymko sshymko changed the title Fix empty/blank file upload Empty file upload fix Aug 26, 2019
@sshymko
Copy link
Contributor Author

sshymko commented Aug 26, 2019

All tests pass, the PR is ready to be merged.

@twose twose merged commit 8ea289f into swoole:master Aug 27, 2019
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.

Cannot upload empty file or blank file field
2 participants