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

Made the bytes to be encoded for base64 scheme to be divisble by 3 #431

Merged
merged 1 commit into from
Mar 6, 2024

Conversation

Gautham-coder
Copy link
Contributor

@Gautham-coder Gautham-coder commented Feb 28, 2024

…g scheme

Proposed changes

When using base64 encoding, the number bytes encoded, causes artifacts if its not divisible by 3 for files larger than 1MB. Currently, this is value is FILE_STREAM_BUFFER_SIZE(defined as 1024000). To fix this issue for the base64 condition we decrease it by 1 to make it divisible by 3.
There is also a comment added to modify this part of code incase there is a change in FILE_STREAM_BUFFER_SIZE value in the future.

This PR addresses Issue: zowe/zss#657

Type of change

  • Bug fix (non-breaking change which fixes an issue)

PR Checklist

Please delete options that are not relevant.

  • If the changes in this PR are meant for the next release / mainline, this PR targets the "staging" branch.
  • My code follows the style guidelines of this project (see: Contributing guideline)
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • New and existing unit tests pass locally with my changes
  • video or image is included if visual changes are made
  • Relevant update to CHANGELOG.md
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works, or describe a test method below

Testing

You can confirm by viewing a file of size greater than 1MB on the zlux-editor or get a file with 'responseType=B64'.

Further comments

@Gautham-coder Gautham-coder changed the title Artifacts14415 Made the bytes to be encoded for base64 scheme to be divisble by 3 Feb 28, 2024
Copy link
Contributor

@JoeNemo JoeNemo left a comment

Choose a reason for hiding this comment

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

Approved.

@JoeNemo JoeNemo merged commit 46fcf51 into v2.x/staging Mar 6, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants