Skip to content

Different behavior between mg_http_reply() and mg_printf() #2530

Discussion options

You must be logged in to vote

Please read https://mongoose.ws/documentation/#best-practices

Long story short: use mg_http_reply() or chunked encoding (mg_http_...chunk()). Those functions set Content-Length and c->is_respfor you. If you use mg_printf() or mg_send() instead, don't forget to set Content-Length and c->is_resp yourself

Please follow the guidelines in the documentation, examples and tutorials available.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by scaprile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants