(#21091) pass --fail to curl

This causes curl to treat things like 404's as errors, causing a
fallback to open-uri and, eventually, a sensible error message.
Merge pull request #1693 from djmitche/bug21091

(#21091) pass --fail to curl