<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Sep 12, 2015 at 12:52 PM, Dridi Boukelmoune <span dir="ltr"><<a href="mailto:dridi@varni.sh" target="_blank">dridi@varni.sh</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sat, Sep 12, 2015 at 12:55 PM, Federico Schwindt <<a href="mailto:fgsch@lodoss.net">fgsch@lodoss.net</a>> wrote:<br>
> Since nitpicking is my name:<br>
><br>
>> + VSLb(bo->vsl, SLT_Uncacheable, "Illegal Vary<br>
>> header");<br>
><br>
> Before this there is a SLT_Error with "Illegal 'Vary' header from backend,<br>
> making this a pass.". Repeating the reason here seems redundant.<br>
<br>
</span>One is an error, the other is informing you that beresp.uncacheable is<br>
set to true (and why).<br></blockquote><div><br></div><div>Fair enough.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
If we instead follow phk's suggestion we could remove said duplication<br>
by having something like:<br>
VCL_set beresp.uncacheable true<br>
<span class=""><br>
>> + if (bo->do_pass) {<br>
>> + bo->uncacheable = 1;<br>
>> + VSLb(bo->vsl, SLT_Uncacheable, "bereq");<br>
>> + }<br>
><br>
> We could argue that this is uncacheable at the time we returned pass. Also<br>
> "bereq" doesn't really tell us anything.<br>
<br>
</span>It tells you that beresp.uncacheable is true because of the bereq. So<br>
obviously either the log record or the docs need to be improved, or<br>
again, phk's suggestion would make things simpler (for the user).<br></blockquote><div><br></div><div>Still doesn't say a thing to me. The pass happens in recv (client side) not in bereq (backend side).<br></div><div>Explaining obscure things in the doc is not the right way to go. If anything it should complement an already well explained situation.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> Furthermore, doing it in here will result in this being logged twice in some<br>
> cases.<br>
<br>
</span>Yes, but it is logged for different reasons, and actually set twice,<br>
so I'd rather see it logged twice for consistency.<br></blockquote><div><br></div><div>I'd rather move it where it belongs, that is where do_pass is set to 1. <br></div></div><br></div></div>