nahi / httpclient

'httpclient' gives something like the functionality of libwww-perl (LWP) in Ruby.
https://github.com/nahi/httpclient
703 stars 290 forks source link

Use `stat` instead of `lstat` to find file size #451

Closed sapio-bdeamer closed 10 months ago

sapio-bdeamer commented 2 years ago

If the selected file is a symlink, lstat.size returns the symlink size in Linux and 0 in Windows, causing a truncated file to be sent. Use stat.size instead.

nahi commented 10 months ago

Thank you.