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

Hosting on S3 - Null control characters at EOF #4128

Open
kiwikodes opened this issue Jun 30, 2024 · 0 comments
Open

Hosting on S3 - Null control characters at EOF #4128

kiwikodes opened this issue Jun 30, 2024 · 0 comments

Comments

@kiwikodes
Copy link

Issue Description: When using S3 to store Dynmap files, the files round up to the nearest 8KB. This results in null characters at the end of every file, and hence, the files cannot run.

  • Dynmap Version: 3.7-SNAPSHOT-949
  • Server Version: fabric 1.21 (presumably all other versions also)
  • Other Relevant Data/Screenshots:
    Screenshot of S3 file sizes
    image
    Screenshot of null control characters at end of file
    image
    Steps to Replicate:
  1. Change configuration.txt to host files on an S3 bucket
  2. Run Dynmap as per usual, and try to view the static site from S3 bucket

The site runs but complains about all the JS files. The site will just give a completely black screen, no compass or anything.

I believe this bug was introduced in #4030. For some reason, every instance of s3.putObject(req, RequestBody.fromBytes(encImage.buf, encImage.len)); had encImage.len removed. This causes the whole buffer to be written to S3 (including the unwanted null characters).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant