-#define RESPONSE_ERROR "400 Bad Request"
-#define RESPONSE_MSG "Your browser sent an invalid request."
- fprintf(client_fd, HTTP_RESPONSE_FORMAT,
- RESPONSE_ERROR, RESPONSE_ERROR, RESPONSE_ERROR,
- RESPONSE_MSG);
-#undef RESPONSE_ERROR
-#undef RESPONSE_MSG
+ 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);