serve_file() is broken due to evbuffer_read()

If we ever need to serve files for a web interface or otherwise, serve_file()
will need to be fixed to not use evbuffer_read().
This commit is contained in:
Julien BLACHE 2010-02-02 21:05:32 +01:00
parent 6e5f49bdf9
commit 848dd41993
1 changed files with 3 additions and 0 deletions

View File

@ -760,6 +760,9 @@ serve_file(struct evhttp_request *req, char *uri)
return;
}
/* FIXME: this is broken, if we ever need to serve files here,
* this must be fixed.
*/
ret = evbuffer_read(evbuf, fd, sb.st_size);
close(fd);
if (ret < 0)