httperror.c (735B)
1 /************************************************************************* 2 * This file is part of Crosroads 1.23, a load balancer and fail over 3 * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. 4 * Visit http://crossroads.e-tunity.com for information. 5 *************************************************************************/ 6 #include "crossroads.h" 7 #include "proxyerror.h" 8 9 void http_error (int clientsock) { 10 char *buf = str_printf ("HTTP/1.0 502 Internal Server Error\r\n" 11 "Content-Length: %d\r\n" 12 "\r\n" 13 ERRORTEXT, 14 strlen(ERRORTEXT)); 15 write (clientsock, buf, strlen(buf)); 16 decr_client_count(); 17 error ("No back end could be selected. Client received error page."); 18 }