aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/http.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/http.c b/src/http.c
index 3f6294d..faec11a 100644
--- a/src/http.c
+++ b/src/http.c
@@ -93,14 +93,18 @@ void send_redirect(const char *location) {
return;
}
- char http_response_header[BUFFER_SIZE];
+ char http_response_header[BUFFER_SIZE * 2];
+ char cookie_headers[BUFFER_SIZE];
+
+ build_cookie_headers(cookie_headers, sizeof(cookie_headers));
snprintf(http_response_header, sizeof(http_response_header),
"HTTP/1.1 302 Found\r\n"
- "Location: %s\r\n"
- "Connection: close\r\n"
- "\r\n",
- location);
+ "Location: %s\r\n"
+ "%s"
+ "Connection: close\r\n"
+ "\r\n",
+ location, cookie_headers);
if (send(current_client_socket, http_response_header,
strlen(http_response_header), 0) < 0) {