Disable range request if content-length is unknown

Fixes #3137.