From a4c9d1ecb756205a6b471172e563c492da7324db Mon Sep 17 00:00:00 2001 From: cpq Date: Thu, 7 Jan 2021 16:21:01 +0000 Subject: [PATCH] Update mg_http_serve_file() doc --- docs/README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 9f982c28..cfdbb463 100644 --- a/docs/README.md +++ b/docs/README.md @@ -650,7 +650,12 @@ void mg_http_serve_file(struct mg_connection *, struct mg_http_message *hm, const char *extra_headers); ``` -Serve static file. +Serve static file. Note that the `extra_headers` must end with `\r\n`. Here +is an example call: + +```c +mg_http_serve_file(c, hm, "a.png", "image/png", "AA: bb\r\nCC: dd\r\n"); +``` ### mg\_http\_reply()