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

RE: add GETAJAX verb/method in http protocol

From: Musatov, Martin - CW <Martin.Musatov@bestbuy.com>
Date: Tue, 22 May 2012 19:34:27 +0000
To: Poul-Henning Kamp <phk@phk.freebsd.dk>, Christian RIGONI <christian.rigoni@tic-congo.com>
CC: "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Message-ID: <1A861E6970A91447BBC0BD2021F75320DA1F@SN2PRD0610MB371.namprd06.prod.outlook.com>
Always attribute to kindness what can adequately be explained to competence

-----Original Message-----
From: Poul-Henning Kamp [mailto:phk@phk.freebsd.dk] 
Sent: Tuesday, May 22, 2012 11:34 AM
To: Christian RIGONI
Cc: ietf-http-wg@w3.org
Subject: Re: add GETAJAX verb/method in http protocol

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 19:35:31 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:00 UTC