diff options
Diffstat (limited to 'src/http.c')
| -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) { |
