modified httpdownload.py and test_httpdownload.py