Opened 6 weeks ago

Closed 5 weeks ago

#2061 closed defect (worksforme)

cookie lost in nginx-quic under http/3

Reported by: Yongbing Zhao Owned by:
Priority: critical Milestone: nginx-1.19
Component: nginx-core Version: 1.19.x
Keywords: cookie Cc:
uname -a: Linux vps 4.18.0-193.6.3.el8_2.x86_64 #1 SMP Wed Jun 10 11:09:32 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.19.3
built by gcc 8.3.1 20191121 (Red Hat 8.3.1-5) (GCC)
built with OpenSSL 1.1.1 (compatible; BoringSSL) (running with BoringSSL)
TLS SNI support enabled
configure arguments: --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_v2_module --with-http_gzip_static_module --with-http_sub_module --with-stream --with-http_v3_module --with-cc-opt=-I../boringssl/include --with-ld-opt='-L../boringssl/build/ssl -L../boringssl/build/crypto' --with-http_quic_module --with-stream_quic_module --with-pcre=/data/package/lnmp/lnmp1.7/src/pcre-8.42

Description

Hi

I installed nginx-quic (02ee77f8d53d) on my server. Overall, it works well. However, I found there is some issue with cookie.

Thus, I tested my hypothesis with two simple php scripts (attched below).

First, visit write.php to create cookie, and then visit read.php to retrieve cookie.

The result is that:

When I visit read.php by chrome with http/2, everything is OK.

However, when I visit read.php by chrome with h3-29, the cookie lost.

write.php

<?php
$value = 'something from somewhere';
setcookie("TestCookie", $value);
setcookie("TestCookie", $value, time()+3600); 
setcookie("TestCookie", $value, time()+3600, "/~rasmus/", "example.com", 1);
?>

read.php

<?php
echo $_COOKIE["TestCookie"];
echo "\n--------------\n" ;
print_r($_COOKIE);
?>

Change History (1)

comment:1 by Sergey Kandaurov, 5 weeks ago

Resolution: worksforme
Status: newclosed

Works for me.
The Set-Cookie header is successfully sent by nginx and received by user agent.
Then, the installed cookies are successfully received by nginx in the Cookie header.

Note: See TracTickets for help on using tickets.