W3C home > Mailing lists > Public > ietf-http-wg@w3.org > April to June 2012

Re: add GETAJAX verb/method in http protocol

From: Poul-Henning Kamp <phk@phk.freebsd.dk>
Date: Tue, 22 May 2012 16:34:04 +0000
To: Christian RIGONI <christian.rigoni@tic-congo.com>
cc: ietf-http-wg@w3.org
Message-ID: <8779.1337704444@critter.freebsd.dk>
In message <4FBB98E7.9020208@tic-congo.com>, Christian RIGONI writes:

>Now, suppose the user modify an element of the page. It can be useful to 
>send a http GETAJAX request [...]

Varnish can handle pretty much any weird request, but you have to
neuter some of the rfc2616 heuristics.

Before vcl_miss{} is called, the req.request is forced to "GET",
you will have to undo that, but I think that is about it.

Something like this should do it:

	sub vcl_recv {
		set req.http.x-real-req = req.request;

	sub vcl_miss {
		if (req.http.x-real-req == "GETAJAX") {
			set bereq.request = "GETAJAX";
		unset bereq.http.x-real-req;

Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@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.
Received on Tuesday, 22 May 2012 16:34:54 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 11:11:02 UTC