app.py: Hook up timeout options.
http.py: Improves handling of chunked transfer errors.