diff options
| author | frosty <gabriel@bwaaa.monster> | 2026-03-30 04:58:53 +0300 |
|---|---|---|
| committer | frosty <gabriel@bwaaa.monster> | 2026-03-30 04:58:53 +0300 |
| commit | ea9b44e2b88949d0ac6efc0b06118f6d9ccbe980 (patch) | |
| tree | d61144e0b7e2dc64698d3e5f9f67a15e86aa995b | |
| parent | abc598baf15d6f8a4de395a27ba34b1e769558e1 (diff) | |
| parent | ab4810b05b0fa5c6d7cd7b8e32afbc39c9ad98cc (diff) | |
| download | beaker-ea9b44e2b88949d0ac6efc0b06118f6d9ccbe980.tar.gz | |
Merge branch 'indev'
| -rw-r--r-- | src/http.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -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) { |
