On Fri, Aug 13, 2010 at 3:02 PM, Mariusz Pietrzyk <span dir="ltr"><<a href="mailto:wijet@me.com">wijet@me.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word">Hi,<div class="im"><div><br><div><div>On 2010-08-13, at 13:02, Per Buer wrote:</div><br><blockquote type="cite">On Fri, Aug 13, 2010 at 12:31 PM, Mariusz Pietrzyk <span dir="ltr"><<a href="mailto:wijet@me.com" target="_blank">wijet@me.com</a>></span> wrote:<br>
<div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is there any way around it ? and use "pipe" in vcl_fetch or something else to enable streaming based on backend response?<br></blockquote><div><br></div><div>You could probably modify the request object, restart and then pick up the change in vcl_recv. Not ideal, but it should work.</div>
</div></blockquote></div><br></div></div><div>Where I should do that ? </div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word">
<div><br></div><div>I don't know which request should be streamed till I get whole response from backend in vcl_fetch.</div></div></blockquote><div><br></div><div>In vcl_fetch you'll have the headers, not the object itself. I think you should modify the req object in vcl_fetch and add a X-pipe: header. The restart the transaction.</div>
<div><br></div><div>In vcl_recv you test for the named header and call pipe. I'm not entirely sure how Varnish will handle a switch from pass to pipe in the middle of a restart, but it should be easy to test.</div></div>
<br>-- <br>Per Buer, Varnish Software<br>Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / skype: per.buer<br>