Hello all!<br><div><br></div><div>Consider this scenario: You have a piece of content that has commenting on it. The comments are highly dynamic, but the content of the page itself is basically static. ESI works great here to load all the comments with a TTL of zero.</div>
<div><br></div><div>However, there is a comment form on this page as well. If a comment submission is made, by default Varnish will pass the POST request through to the backend. But on a site that is heavily commented, this means loading up that full page for each POST unnecessarily. The only piece of the page that has changed is the comment ESI, which could very well accept that POST request itself and do the processing, thereby lowering the number of requests to the backend.</div>
<div><br></div><div><div>I see in the ESI code that it is hard coded that all ESI requests are GET requests. Some ESI implementations allow you to specify a method in the tag (e.g., <esi src="foo" method="POST" />). I was thinking it would be handy if Varnish could support this, or something similar. Some way of parsing a POST request as it comes in, and possibly routing it to  the ESI that can accept it. Or maybe even something more abstract than that; a way to further customize the ESI request in the vcl.</div>
</div><div><br></div><div>Thoughts?</div><div><br></div><div>Thanks for your time!</div><div><br></div><div>James</div><div><br></div>