mirror of
https://github.com/cesanta/mongoose.git
synced 2025-06-12 20:59:03 +08:00
Update mg_send_head.md
This commit is contained in:
parent
a11eafc5b3
commit
6ae6ee9fd2
@ -7,15 +7,15 @@ signature: |
|
|||||||
int64_t content_length, const char *extra_headers);
|
int64_t content_length, const char *extra_headers);
|
||||||
---
|
---
|
||||||
|
|
||||||
Send response line and headers.
|
Sends a response line and headers.
|
||||||
This function sends response line with the `status_code`, and automatically
|
This function sends a response line with the `status_code`, and automatically
|
||||||
sends one header: either "Content-Length", or "Transfer-Encoding".
|
sends one header: either "Content-Length" or "Transfer-Encoding".
|
||||||
If `content_length` is negative, then "Transfer-Encoding: chunked" header
|
If `content_length` is negative, then "Transfer-Encoding: chunked" header
|
||||||
is sent, otherwise, "Content-Length" header is sent.
|
is sent, otherwise, "Content-Length" header is sent.
|
||||||
|
|
||||||
NOTE: If `Transfer-Encoding` is `chunked`, then message body must be sent
|
NOTE: If `Transfer-Encoding` is `chunked`, then message body must be sent
|
||||||
using `mg_send_http_chunk()` or `mg_printf_http_chunk()` functions.
|
using `mg_send_http_chunk()` or `mg_printf_http_chunk()` functions.
|
||||||
Otherwise, `mg_send()` or `mg_printf()` must be used.
|
Otherwise, `mg_send()` or `mg_printf()` must be used.
|
||||||
Extra headers could be set through `extra_headers` - and note `extra_headers`
|
Extra headers could be set through `extra_headers`. Note `extra_headers`
|
||||||
must NOT be terminated by a new line.
|
must NOT be terminated by a new line.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user