<div dir="ltr">Hi kokoniimasu,<div><br></div><div><span style="font-size:12.8px">    if(req.http.cookie){</span><br style="font-size:12.8px"><span style="font-size:12.8px">      std.collect(req.http.cookie);</span><br style="font-size:12.8px"><span style="font-size:12.8px">      set req.http.cookie = regsuball(req.http.cookie,", ","; ");</span><br style="font-size:12.8px"><span style="font-size:12.8px">    }</span><br></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">did the trick for me..</span><br></div><div><span style="font-size:12.8px"><br></span></div><div>Thanks for your help.<span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div><div>The other if only seems to be relevant and valid if the backend is a varnish too? My backend is Apache.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature">Med venlig hilsen / Kind regards,<br><br>Christian Bjørnbak<br><br>Chefudvikler / Lead Developer<br>TouristOnline A/S<br>Islands Brygge 43<br>2300 København S<br>Denmark<br>TLF: +45 32888230<br>Dir. TLF: +45 32888235<br></div></div>
<br><div class="gmail_quote">2017-03-17 18:26 GMT+01:00 kokoniimasu <span dir="ltr"><<a href="mailto:kokoniimasu@gmail.com" target="_blank">kokoniimasu@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,Christian.<br>
<br>
#sorry I forgot add ml-list...<br>
<span class="im HOEnZb"><br>
Are you manipulating cookies in Varnish?(set, get...)<br>
Some browser send several cookie header by H/2.<br>
Probably in order to make HPACK compression more effective.<br>
you may want to use std.collect.<br>
I added the this VCL in my environment.<br>
<br>
<br>
sub vcl_recv{<br>
  if(req.proto ~ "HTTP/2"){<br>
    if(req.http.cookie){<br>
      std.collect(req.http.cookie);<br>
      set req.http.cookie = regsuball(req.http.cookie,", ","; ");<br>
    }<br>
    if(req.http.content-length){<br>
      // temporary...<br>
      // <a href="https://github.com/varnishcache/varnish-cache/issues/2247" rel="noreferrer" target="_blank">https://github.com/<wbr>varnishcache/varnish-cache/<wbr>issues/2247</a><br>
      unset req.http.content-length;<br>
    }<br>
  }<br>
}<br>
<br>
I hope to reference.<br>
<br>
--<br>
Shohei Tanaka(@xcir)<br>
<a href="http://blog.xcir.net/" rel="noreferrer" target="_blank">http://blog.xcir.net/</a><br>
<br>
<a href="tel:2017-03-18" value="+4520170318">2017-03-18</a> 1:32 GMT+09:00 Christian Bjørnbak <<a href="mailto:cbj@touristonline.dk">cbj@touristonline.dk</a>>:<br>
</span><div class="HOEnZb"><div class="h5">> Hi,<br>
><br>
> I setup h2 with Hitch 1.4.4 and Varnish 5.1.1 following the guide in the<br>
> release announcement.<br>
><br>
> It works for stateless pages but if I try to log into our extranet where we<br>
> use an jsessionid cookie varnish seems to discard the cookie from the<br>
> request.<br>
><br>
> When I enter the login page I receive a jsessionid cookie in the browser.<br>
><br>
> When I submit the login form I am redirected to the login page with a new<br>
> jsessionid cookie.<br>
><br>
> If I disable alpn in the Hitch config everything works at it use to but of<br>
> course without h2...<br>
><br>
><br>
> From what I can find on google h2 is suppose to support h1 style cookies:<br>
> <a href="http://unrestful.io/2015/06/21/cookies.html" rel="noreferrer" target="_blank">http://unrestful.io/2015/06/<wbr>21/cookies.html</a><br>
><br>
><br>
> Do I need to change something in the VCL to support (jsessionid) cookies<br>
> with h2?<br>
><br>
><br>
><br>
> Med venlig hilsen / Kind regards,<br>
><br>
> Christian Bjørnbak<br>
><br>
> Chefudvikler / Lead Developer<br>
> TouristOnline A/S<br>
> Islands Brygge 43<br>
> 2300 København S<br>
> Denmark<br>
> TLF: <a href="tel:%2B45%2032888230" value="+4532888230">+45 32888230</a><br>
> Dir. TLF: <a href="tel:%2B45%2032888235" value="+4532888235">+45 32888235</a><br>
><br>
</div></div><div class="HOEnZb"><div class="h5">> ______________________________<wbr>_________________<br>
> varnish-misc mailing list<br>
> <a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
> <a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" rel="noreferrer" target="_blank">https://www.varnish-cache.org/<wbr>lists/mailman/listinfo/<wbr>varnish-misc</a><br>
</div></div></blockquote></div><br></div>