restart download if errors occurred.
Ignore cases when parsing http header.

Some servers are not following http standard exactly..
Merge branch 'dev'