L
L
lexstile2021-12-19 13:40:47
PHP
lexstile, 2021-12-19 13:40:47

Why is the equal sign in the cookie being replaced with %3D?

I'm trying to set a cookie:

// eyJhbGciOiJzaGEyNTYiLCJ0eXAiOiJKV1QifQ%3D%3D.{$payload_refresh}.{$signature}
setcookie('token', $refresh_token, $payload_refresh->exp, '/'auth, 'site.ru', true, true);

When I set a cookie, I get a double equal at the end of the line.
And it is replaced by a double one - %3D.
Question: Is this how it should be or is something going wrong? And if it goes wrong, how to fix the situation?

IMHO: it looks like the equal sign is reserved, because it is used to assign a value to some field.
61bf0c26d4f48562072474.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question