/*
* Treebird - Lightweight frontend for Pleroma
*
* Licensed under the BSD 3-Clause License
*/
#include "http.h"
#define REDIR_HTML_BEGIN "" \
"" \
"
" \
"Redirecting" \
"" \
""
#define REDIR_HTML_END "" \
""
void redirect(REQUEST_T req, char* status, char* location)
{
char* loc_str = location ? location : "/";
PRINTF("Status: %s\r\n"
"Location: %s\r\n\r\n"
REDIR_HTML_BEGIN "Redirecting to %s..." REDIR_HTML_END,
status,
loc_str,
loc_str);
}