src/proto_http.c
static int val_hdr(struct arg *arg, char **err_msg)
{
	if (arg && arg[1].type == ARGT_SINT && arg[1].data.sint < -MAX_HDR_HISTORY) {
		memprintf(err_msg, "header occurrence must be >= %d", -MAX_HDR_HISTORY);
		return 0;
	}
	return 1;
}
/* This function is used to validate the arguments passed to any "hdr" fetch
 * keyword. These keywords support an optional positive or negative occurrence
 * number. We must ensure that the number is greater than -MAX_HDR_HISTORY. It
 * is assumed that the types are already the correct ones. Returns 0 on error,
 * non-zero if OK. If <err> is not NULL, it will be filled with a pointer to an
 * error message in case of error, that the caller is responsible for freeing.
 * The initial location must either be freeable or NULL.
 */
This function is used to validate the arguments passed to any "hdr" fetch
keyword. These keywords support an optional positive or negative occurrence
number. We must ensure that the number is greater than -MAX_HDR_HISTORY. It
is assumed that the types are already the correct ones. Returns 0 on error,
non-zero if OK. If  is not NULL, it will be filled with a pointer to an
error message in case of error, that the caller is responsible for freeing.
The initial location must either be freeable or NULL.
This function is used to validate the arguments passed to any " hdr " fetch keyword . These keywords support an optional positive or negative occurrence number . We must ensure that the number is greater than - MAX_HDR_HISTORY . It is assumed that the types are already the correct ones . Returns 0 on error non - zero if OK . If is not NULL it will be filled with a pointer to an error message in case of error that the caller is responsible for freeing . The initial location must either be freeable or NULL .
static int val_hdr(struct arg *arg, char **err_msg)
{
	if (arg && arg[1].type == ARGT_SINT && arg[1].data.sint < -MAX_HDR_HISTORY) {
		memprintf(err_msg, "header occurrence must be >= %d", -MAX_HDR_HISTORY);
		return 0;
	}
	return 1;
}
static int val_hdr ( struct arg * arg , char * * err_msg ) { if ( arg && arg [ 1 ] . type == ARGT_SINT && arg [ 1 ] . data . sint < - MAX_HDR_HISTORY ) { memprintf ( err_msg , " " , - MAX_HDR_HISTORY ) ; return 0 ; } return 1 ; }
This function is used to validate the arguments passed to any "hdr" fetch
 keyword.
This function is used to validate the arguments passed to any " hdr " fetch keyword .