mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-24 11:54:49 +00:00
Add mg_http_send_redirect and make examples use it
PUBLISHED_FROM=f45e06aeba1c00212078d539b6f74cb8bd054326
This commit is contained in:
1 parent
8f522048d8
commit
460d95afc5
12 files changed
+119
-41
No files matched your search
@@ -20,7 +20,7 @@ static void handle_save(struct mg_connection *nc, struct http_message *hm) {
|
||||
sizeof(s_settings.setting2));
|
||||
|
||||
// Send response
|
||||
mg_printf(nc, "%s", "HTTP/1.1 302 OK\r\nLocation: /\r\n\r\n");
|
||||
mg_http_send_redirect(nc, 302, mg_mk_str("/"), mg_mk_str(NULL));
|
||||
}
|
||||
|
||||
static void handle_ssi_call(struct mg_connection *nc, const char *param) {
|
||||
|
||||
Reference in new issue
Block a user