From e2330944d4e04082096d49ffd1e98b153167a53c Mon Sep 17 00:00:00 2001 From: Evelyn Date: Fri, 22 Jul 2016 16:13:20 +0100 Subject: [PATCH] Update mg_send_http_chunk.md --- docs/c-api/http.h/mg_send_http_chunk.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/c-api/http.h/mg_send_http_chunk.md b/docs/c-api/http.h/mg_send_http_chunk.md index 6d017fbb..b78dae6b 100644 --- a/docs/c-api/http.h/mg_send_http_chunk.md +++ b/docs/c-api/http.h/mg_send_http_chunk.md @@ -6,16 +6,16 @@ signature: | void mg_send_http_chunk(struct mg_connection *nc, const char *buf, size_t len); --- -Send buffer `buf` of size `len` to the client using chunked HTTP encoding. -This function first sends buffer size as hex number + newline, then -buffer itself, then newline. For example, - `mg_send_http_chunk(nc, "foo", 3)` whill append `3\r\nfoo\r\n` string to +Sends buffer `buf` of size `len` to the client using chunked HTTP encoding. +This function sends the buffer size as hex number + newline first, then +the buffer itself, then the newline. For example, + `mg_send_http_chunk(nc, "foo", 3)` whill append the `3\r\nfoo\r\n` string to the `nc->send_mbuf` output IO buffer. -NOTE: HTTP header "Transfer-Encoding: chunked" should be sent prior to +NOTE: The HTTP header "Transfer-Encoding: chunked" should be sent prior to using this function. -NOTE: do not forget to send empty chunk at the end of the response, +NOTE: do not forget to send an empty chunk at the end of the response, to tell the client that everything was sent. Example: ```