Copyright © https://mongoose-os.com

Mongoose OS Forum

frame

File downloads with mg_http_serve_file

marcelwirtzmarcelwirtz Germany

Hey there,

i want to download files which are served with the mg_http_serve_file function. The problem i have is not getting the download startet but i get a timeout on the client side (libCurl library) if the file is so large that it can't be downloaded completely until the timeout is reached. I don't think that this is a libCurl problem because if i download the file from a normal webserver like Apache or Nginx i don't get a timeout on the libCurl side.

Is there something i missed? I put it together like it is mentioned here -> https://cesanta.com/docs/http/files.html

Kind regards,
Marcel

Comments

  • Frankly the web server implementation seems to have hiccups. I get less than 1 MB/s via localhost with zero cpu load and the upload is even more pathetic. You might want to try enlarging MG_TCP_IO_SIZE, maybe it helps (it did for uploads).

    Thanked by 1marcelwirtz
Sign In or Register to comment.