mg_read() with no Content-Length would read until socket is closed