src/proto_http.c
void http_return_srv_error(struct session *s, struct stream_interface *si)
{
	int err_type = si->err_type;

	if (err_type & SI_ET_QUEUE_ABRT)
		http_server_error(s, si, SN_ERR_CLICL, SN_FINST_Q,
				  503, http_error_message(s, HTTP_ERR_503));
	else if (err_type & SI_ET_CONN_ABRT)
		http_server_error(s, si, SN_ERR_CLICL, SN_FINST_C,
				  503, http_error_message(s, HTTP_ERR_503));
	else if (err_type & SI_ET_QUEUE_TO)
		http_server_error(s, si, SN_ERR_SRVTO, SN_FINST_Q,
				  503, http_error_message(s, HTTP_ERR_503));
	else if (err_type & SI_ET_QUEUE_ERR)
		http_server_error(s, si, SN_ERR_SRVCL, SN_FINST_Q,
				  503, http_error_message(s, HTTP_ERR_503));
	else if (err_type & SI_ET_CONN_TO)
		http_server_error(s, si, SN_ERR_SRVTO, SN_FINST_C,
				  503, http_error_message(s, HTTP_ERR_503));
	else if (err_type & SI_ET_CONN_ERR)
		http_server_error(s, si, SN_ERR_SRVCL, SN_FINST_C,
				  503, http_error_message(s, HTTP_ERR_503));
	else /* SI_ET_CONN_OTHER and others */
		http_server_error(s, si, SN_ERR_INTERNAL, SN_FINST_C,
				  500, http_error_message(s, HTTP_ERR_500));
}
/* Return the error message corresponding to si->err_type. It is assumed
 * that the server side is closed. Note that err_type is actually a
 * bitmask, where almost only aborts may be cumulated with other
 * values. We consider that aborted operations are more important
 * than timeouts or errors due to the fact that nobody else in the
 * logs might explain incomplete retries. All others should avoid
 * being cumulated. It should normally not be possible to have multiple
 * aborts at once, but just in case, the first one in sequence is reported.
 */
Return the error message corresponding to si->err_type. It is assumed
that the server side is closed. Note that err_type is actually a
bitmask, where almost only aborts may be cumulated with other
values. We consider that aborted operations are more important
than timeouts or errors due to the fact that nobody else in the
logs might explain incomplete retries. All others should avoid
being cumulated. It should normally not be possible to have multiple
aborts at once, but just in case, the first one in sequence is reported.
Return the error message corresponding to si - > err_type . It is assumed that the server side is closed . Note that err_type is actually a bitmask where almost only aborts may be cumulated with other values . We consider that aborted operations are more important than timeouts or errors due to the fact that nobody else in the logs might explain incomplete retries . All others should avoid being cumulated . It should normally not be possible to have multiple aborts at once but just in case the first one in sequence is reported .
void http_return_srv_error(struct session *s, struct stream_interface *si)
{
	int err_type = si->err_type;
	if (err_type & SI_ET_QUEUE_ABRT)
		http_server_error(s, si, SN_ERR_CLICL, SN_FINST_Q,
				  503, http_error_message(s, HTTP_ERR_503));
	else if (err_type & SI_ET_CONN_ABRT)
		http_server_error(s, si, SN_ERR_CLICL, SN_FINST_C,
				  503, http_error_message(s, HTTP_ERR_503));
	else if (err_type & SI_ET_QUEUE_TO)
		http_server_error(s, si, SN_ERR_SRVTO, SN_FINST_Q,
				  503, http_error_message(s, HTTP_ERR_503));
	else if (err_type & SI_ET_QUEUE_ERR)
		http_server_error(s, si, SN_ERR_SRVCL, SN_FINST_Q,
				  503, http_error_message(s, HTTP_ERR_503));
	else if (err_type & SI_ET_CONN_TO)
		http_server_error(s, si, SN_ERR_SRVTO, SN_FINST_C,
				  503, http_error_message(s, HTTP_ERR_503));
	else if (err_type & SI_ET_CONN_ERR)
		http_server_error(s, si, SN_ERR_SRVCL, SN_FINST_C,
				  503, http_error_message(s, HTTP_ERR_503));
	else 
		http_server_error(s, si, SN_ERR_INTERNAL, SN_FINST_C,
				  500, http_error_message(s, HTTP_ERR_500));
}
void http_return_srv_error ( struct session * s , struct stream_interface * si ) { int err_type = si -> err_type ; if ( err_type & SI_ET_QUEUE_ABRT ) http_server_error ( s , si , SN_ERR_CLICL , SN_FINST_Q , 503 , http_error_message ( s , HTTP_ERR_503 ) ) ; else if ( err_type & SI_ET_CONN_ABRT ) http_server_error ( s , si , SN_ERR_CLICL , SN_FINST_C , 503 , http_error_message ( s , HTTP_ERR_503 ) ) ; else if ( err_type & SI_ET_QUEUE_TO ) http_server_error ( s , si , SN_ERR_SRVTO , SN_FINST_Q , 503 , http_error_message ( s , HTTP_ERR_503 ) ) ; else if ( err_type & SI_ET_QUEUE_ERR ) http_server_error ( s , si , SN_ERR_SRVCL , SN_FINST_Q , 503 , http_error_message ( s , HTTP_ERR_503 ) ) ; else if ( err_type & SI_ET_CONN_TO ) http_server_error ( s , si , SN_ERR_SRVTO , SN_FINST_C , 503 , http_error_message ( s , HTTP_ERR_503 ) ) ; else if ( err_type & SI_ET_CONN_ERR ) http_server_error ( s , si , SN_ERR_SRVCL , SN_FINST_C , 503 , http_error_message ( s , HTTP_ERR_503 ) ) ; else http_server_error ( s , si , SN_ERR_INTERNAL , SN_FINST_C , 500 , http_error_message ( s , HTTP_ERR_500 ) ) ; }
Return the error message corresponding to si->err_type.
Return the error message corresponding to si - > err_type .
/* SI_ET_CONN_OTHER and others */