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 the size of the bulk data that can be set in a PutFile #1927

Closed
NicoleYarroch opened this issue Mar 2, 2021 · 0 comments · Fixed by #1935
Closed

Fix the size of the bulk data that can be set in a PutFile #1927

NicoleYarroch opened this issue Mar 2, 2021 · 0 comments · Fixed by #1935
Assignees
Labels
bug A defect in the library

Comments

@NicoleYarroch
Copy link
Contributor

NicoleYarroch commented Mar 2, 2021

In the SDLUploadFileOperation class, if the file data exceeds the max size allowed for a packet, the file data is broken into chunks and sent in separate SDLPutFiles. However, there is a bug in the algorithm that breaks the file data into chunks because it assumes that the max allowed data chunk size is the max mtu size for the RPC service. This is wrong because the max mtu size is for the entire packet, which also includes the frame header, binary header, and JSON data along with the bulk data.

Since the file data is broken into chunks equal to the max mtu size, each of the messages generated for the SDLPutFiles will exceed the allowed mtu size. This means that in the protocol layer, the messages will be sent as multi-frame packets instead of as one single-frame packet. This defeats the purpose of breaking the file data into chunks and sending it in multiple SDLPutFiles.

Reproduction Steps
  1. Use the file manager to upload a very large file that must be broken into separate SDLPutFiles.
Expected Behavior

All of the packets created for the SDLPutFiles generated by the SDLUploadFileOperation should be less than or equal to the mtu size allowed by the RPC service.

Observed Behavior

All of the packets (except the last packet) created for the SDLPutFiles generated by the SDLUploadFileOperation are greater than the mtu size allowed by the RPC service.

OS & Version Information
  • iOS Version: n/a
  • SDL iOS Version: 7.1
  • Testing Against: n/a
@NicoleYarroch NicoleYarroch added the bug A defect in the library label Mar 2, 2021
@NicoleYarroch NicoleYarroch self-assigned this Mar 2, 2021
@NicoleYarroch NicoleYarroch linked a pull request Mar 4, 2021 that will close this issue
6 tasks
@joeljfischer joeljfischer mentioned this issue Mar 15, 2021
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A defect in the library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants