add some funtion for file download, add codes to support file download in httpRemoteServer