toland / patron

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

Add support for LOW_SPEED_TIME and LOW_SPEED_LIMIT #149

Closed julik closed 6 years ago

julik commented 6 years ago

These permit libCURL to time out early if the socket is starved. This is useful for setting timeouts based on the expected response size, as opposed to configuring one hard read timeout for the entire response receive time stretch. For instance, with a read timeout, you would need to set a value that works equally well for a 5MB download as well as for a 50MB download.

These two CURLOPTs permit timeouts based on speed as well.