- fprintf(client_fd, "HTTP/1.0 400 Bad Request\r\n");
- fprintf(client_fd, "\r\n");
+ const char error[] = "400 Bad Request";
+ const char msg[] = "Your browser sent an invalid request.";
+ fprintf(client_fd, HTTP_RESPONSE_FORMAT, error, "", error, error, msg);
+ fflush(client_fd);
+}
+static void send_authentication_required(FILE *client_fd) {
+ const char error[] = "407 Proxy Authentication Required";
+ const char auth[] = "Proxy-Authenticate: Basic realm=\"tlsproxy\"\r\n";
+ const char msg[] = "TODO";
+ fprintf(client_fd, HTTP_RESPONSE_FORMAT, error, auth, error, error, msg);
+ fflush(client_fd);