New VCL toys, please test!

Poul-Henning Kamp phk at phk.freebsd.dk
Thu Jul 5 12:01:52 CEST 2007


I have just committed some new VCL toys to -trunk, please help me test
these if you can do things like:

	sub vcl_miss {
		set bereq.http.HeyYou = "This" req.url " is Urgent!" ;
		remove bereq.http.user-agent ;
	}

which would add this HTTP header to the request to the backend:

	HeyYou: This / is Urgent!

and remove any User-Agent: headers.

There are now a total of four HTTP protocol messages that can be accessed
from VCL:

	req.*		- The original request from the client
	bereq.*		- The request we send to the backend 
	obj.*		- The response stored in the object
	resp.*		- The response we send to the client

Here is a machine-generated plot of the VCL flow in -trunk:

	http://phk.freebsd.dk/misc/_.pdf

The right hand side of the boxes show which HTTP objects you have
access to in each of the VCL methods.

Feedback please!


-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.



More information about the varnish-misc mailing list