aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosty <gabriel@bwaaa.monster>2026-03-30 04:58:53 +0300
committerfrosty <gabriel@bwaaa.monster>2026-03-30 04:58:53 +0300
commitea9b44e2b88949d0ac6efc0b06118f6d9ccbe980 (patch)
treed61144e0b7e2dc64698d3e5f9f67a15e86aa995b
parentabc598baf15d6f8a4de395a27ba34b1e769558e1 (diff)
parentab4810b05b0fa5c6d7cd7b8e32afbc39c9ad98cc (diff)
downloadbeaker-ea9b44e2b88949d0ac6efc0b06118f6d9ccbe980.tar.gz
Merge branch 'indev'
-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) {