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

HGET: Issues downloading files less than 100 bytes #25

Open
nataliapc opened this issue Aug 15, 2024 · 2 comments
Open

HGET: Issues downloading files less than 100 bytes #25

nataliapc opened this issue Aug 15, 2024 · 2 comments

Comments

@nataliapc
Copy link

  • For files [25..99] bytes:
    The progress bar will overflow the 25 chars.
  • For files [1..24] bytes
    The 'blockSize' become 0 and progress bar loop is infinite until Ctrl+C.

blockSize = contentLength/25;

blockSize = contentLength/25;

@nataliapc
Copy link
Author

Adding line:
if (!blockSize) blockSize++;

After every blockSize asigment must prevent the hang up for files below 25 bytes.

But progress bar issue persist for files 99 bytes and [1..24] bytes length (tested only with 24, 25, 99, 100 bytes files).

@nataliapc
Copy link
Author

I posted the final bugfix code at pastebin, feel free to modify or optimize my proposal as you wish.

Pastebin diff code

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

No branches or pull requests

1 participant