简体   繁体   中英

downloading file over http not working but over https working fine

I have the following scenario downloading a file form sever:

  • I am trying to download many files from server over HTTP (but not SSL ) in an ASP.NET page, but one of the files is not downloading; it returns an error: operation timeout .

  • When I try to download this file over HTTPS, it works well.

  • I tried to download the file using other software using plain HTTP and I received the same error message.

I am greatly appreciative of any guidance or help.

if (The file is executable file )

May be because the web server for some EXE files resides on doesn't send a
Content-Length header. If this header is absent, the only way you can determine if the download is complete is "when the bytes stop coming", ie the TCP/IP connection is closed or times out. If the connection quality is low, this may very well happen prematurely.

But why this not happened in Https? Thats because http has bigger waiting time and smaller receiving time. https on the other hand has smaller waiting time and bigger receiving time.

The http port on the shared hosting server is more busy, thus a request stays longer in the queue until is accepted by the server.

On the https port there is less traffic on the server so the request is serviced faster.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM