Copyright ©

Mongoose OS Forum


File downloads with mg_http_serve_file

marcelwirtzmarcelwirtz Germany
edited November 2018 in Mongoose Networking Library

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 ->

Kind regards,


  • 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.