toland / patron

Ruby HTTP client based on libcurl
http://toland.github.com/patron/
MIT License
541 stars 73 forks source link

Allow limiting the download size via CURL progress callback #140

Closed julik closed 7 years ago

julik commented 8 years ago

I thought we could expand on the interrupt handling and add a download size limiter. The rationale is simple: sometimes you want to make sure the server on the other end will not overflow your disk (by mistake or by malice).

Note that I had to switch to Ubuntu 14 on Travis because on their Precise stuff libCURL has a bug that won't let it stop on an interrupt. Same for Session#interrupt but there were no tests for that either, so got to add them soon.

toland commented 8 years ago

I am +1 on the change, but one of the specs fails on Travis. Fix the failing spec and I am good with merging.

Thanks!

julik commented 8 years ago

👍 will do

julik commented 7 years ago

@toland 🎉

toland commented 7 years ago

LGTM