mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-12 23:49:00 +08:00
23122b327c
It would be probably good idea to also remove tools/docgen.py and asciidoc.mk, but asciidoc.mk is still mentioned under `cloud/doc`, which may contain some useful info which we'll need at least to review before removing. PUBLISHED_FROM=faf454d4c52a2f07ea8ac084cf0bd11a0c9c9b3b
843 B
843 B
title | decl_name | symbol_kind | signature |
---|---|---|---|
mg_send_head() | mg_send_head | func | void mg_send_head(struct mg_connection *n, int status_code, int64_t content_length, const char *extra_headers); |
Send response line and headers.
This function sends response line with the status_code
, and automatically
sends one header: either "Content-Length", or "Transfer-Encoding".
If content_length
is negative, then "Transfer-Encoding: chunked" header
is sent, otherwise, "Content-Length" header is sent.
NOTE: If Transfer-Encoding
is chunked
, then message body must be sent
using mg_send_http_chunk()
or mg_printf_http_chunk()
functions.
Otherwise, mg_send()
or mg_printf()
must be used.
Extra headers could be set through extra_headers
- and note extra_headers
must NOT be terminated by a new line.