Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Compare 'bereq.backend' / 'req.backend_hint' myDirector.backend() does not work #2168
"if ( req.backend_hint == d1.backend() )" and also "if ( bereq.backend == d1.backend() )" does not compile in Varnish 4.1.4. Please see the following Varnish Test Case:
Please also see the following discussion:
@Dridi says: "mention that it does work on the master branch"
A proper work-around is
The type system in vcl has changed a lot i master since 4.1, and I would say that comparing backend expressions is a feature not present in 4.1, and that we should leave it that way.
However, trying to make a shorter, similar workaround for
turns out to crash VCC with the message:
I will try to fix the crash, but in my opinion nothing else should be done for 4.1.
The crash in the previous comment happens because
The next time
One solution would be, in
The test case checks the error messages to some degree, but I should give you the full info:
In the first
In the second
The point here is that people might privoed an expression. Maybe I should use the word "expected" in this message?
In the last
which is unchanged from before the patch.