Is there a way to make curl abort transfer, if average speed of transfer (during POST) is slower than X.X KB/s? Some transfers get really, really slow and I would want them to restart. One of the easier ways would be take size of content to be uploaded and divide it by expected speed and assign this value into --max-time parameter. But this would have to wait whole expected duration of transfer before it would abort...
I am using command-line version of curl, but I wouldn't mind if solution could be done (or work around) in any popular languages already built-in Linux such as perl or python :)
By the way -Y/--speed-limit <speed>
didn't work for me, as it's probably only for download transfers.