Literal ip4/6 addresses in VCL

Nils Goroll slink at schokola.de
Sun Mar 7 15:23:38 CET 2010


>> My main question is if they should be tokenized as CSTRs or rather as new 
>> tokens, e.g. of token type IP (not to be confused with variable type IP).
> 
> The syntax for this is already decided, just not implemented:
> 
> 	set client.ip = IP(req.http.x-forwarded-for);

Thank you for pointing this out, so I am going to implement this syntax for the 
case where runtime conversion is needed.

Do you have an opinion regarding the suggestion for the VCL compile time case?

IOW, do you favor

	set client.ip = [123.45.67.8];
or
	set client.ip = "123.45.67.8";

or even no compile time support as in

	set client.ip = IP("123.56.78.9");

Thanks, Nils



More information about the varnish-dev mailing list