<div dir="ltr">If we're changing things, it would be useful to have something in synth other than a 3 digit status code. <div><br></div><div>I wouldn't mind a 64-bit (or 32-bit if you must) argument to synth(), either instead of the status code, or in addition to.</div>
<div><br></div><div>This would give a little more headroom for choices of synthetic bodies. </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 27, 2013 at 3:28 AM, Poul-Henning Kamp <span dir="ltr"><<a href="mailto:phk@phk.freebsd.dk" target="_blank">phk@phk.freebsd.dk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
I think I have made up my mind about how to do synthetic objects in<br>
V4, but I'd like to run the idea past you guys first.<br>
<br>
In vcl_backend_(fetch|response){} you do:<br>
<br>
        return (synth(777));<br>
<br>
Then you end up in vcl_backend_synth{} where, like in vcl_error{}, you<br>
can flesh out the object with headers and a body.<br>
<br>
The object will have a TTL of zero by default, but you can change that<br>
if you want to cache the object (unless it's a pass of course).<br>
<br>
Good or bad idea ?<br>
<br>
Poul-Henning<br>
<br>
PS: Yes, I do realize that together with std.fileread() this makes<br>
Varnish a webserver, but I trust^H^H^H^H^Hhope that people will<br>
restrain themselves<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20<br>
phk@FreeBSD.ORG         | TCP/IP since RFC 956<br>
FreeBSD committer       | BSD since 4.3-tahoe<br>
Never attribute to malice what can adequately be explained by incompetence.<br>
<br>
_______________________________________________<br>
varnish-dev mailing list<br>
<a href="mailto:varnish-dev@varnish-cache.org">varnish-dev@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev</a><br>
<br>
</font></span></blockquote></div><br></div>