nginx-quic, php able to access last set cookie only

Sergey Kandaurov pluknet at nginx.com
Wed Jan 12 11:14:17 UTC 2022


> On 19 Dec 2021, at 21:24, Kareti Ramakrishna MBA <karetirk at gmail.com> wrote:
> 
> I implemented nginx-quic using the steps at https://quic.nginx.org/readme.html
> The page is validating http3 quic at https://http3check.net and https://gf.dev/http3-test
> 
> The page elements show h3 protocol in developer tools network tab.
> 
> in a test.php page, I have set 3 php cookies like this:
> 
> <?php
> $q=setcookie('test1', 'content1', time()+315360000, '/', '', true, true
> );
> 
> $q=setcookie('test2', 'content2', time()+315360000, '/', '', true, true
> );
> 
> $q=setcookie('test3', 'content3', time()+315360000, '/', '', true, true
> );
> 
> ?>
> In test2.php in the same domain and same directory, I tried to access the cookies :
> 
> <?php
> 
> var_dump(
> $_COOKIE
> );
> 
> ?>
> It is showing only the last set cookie.
> 
>  array(1) { ["test3"]=> string(8) "content3"
>  }
> 
> all the three cookies are showing in developer tools.
> 
> Javascript is able to read all the three cookies :
> 
> <script>
> 
> var
>  decodedCookie = decodeURIComponent(document.cookie);
> console.log(
> 'c='
> +decodedCookie);
> </script>
> 
> If I use nginx http2, php is able to access all the three cookies.
> 
> But, If I use nginx http3, php is able to access only the last cookie.

Hello.

There was a recent fix to proxy cookies in a concatenated list.
See https://hg.nginx.org/nginx-quic/rev/10522e8dea41

-- 
Sergey Kandaurov




More information about the nginx-devel mailing list