Hi,

I'm mostly a newby.

I downgraded varnish to v 2.0.3 in order to use the varnish-bereq-hosts.patch

I want to :

  1. Store the backend name into X-Backend custom header
  2. Force each request with  a X-Backend header to be directed to the
     stored backend name

My .vcl file :

sub vcl_recv {
.../...
if (req.http.host ~ "^(www.)?mysite.com$") {
   if (req.http.X-Backend) {
       set req.backend = req.http.X-Backend ;
   } else {
       set req.backend = www_director;
   }
}
../..
sub vcl_fetch {.
../..
   set obj.http.X-Backend = bereq.backend;
../..

And I got the following error :
Message from VCC-compiler:
Expected ID got 'req.http.X-Backend'
(program line 233), at
(input Line 54 Pos 27)
       set req.backend = req.http.X-Backend ;
--------------------------##################--

I don't know how to transfer X-Backend value into req.backend.

Can you help me please ?

Best regards.
--
Bernard FRIT

_______________________________________________
varnish-misc mailing list
[email protected]
http://projects.linpro.no/mailman/listinfo/varnish-misc

Reply via email to