-
Notifications
You must be signed in to change notification settings - Fork 35
Feat: Improve cookie handling #180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
| $cookie = 'cookie1=value1'; | ||
| $response = $this->client->call(Client::METHOD_GET, '/cookies', [ | ||
| 'Cookie: cookie1=value1; cookie2=value2' | ||
| 'Cookie: ' . $cookie | ||
| ]); | ||
| $this->assertEquals(200, $response['headers']['status-code']); | ||
| $this->assertEquals($cookie, $response['body']); | ||
|
|
||
| $cookie = 'cookie1=value1; cookie2=value2'; | ||
| $response = $this->client->call(Client::METHOD_GET, '/cookies', [ | ||
| 'Cookie: ' . $cookie | ||
| ]); | ||
| $this->assertEquals(200, $response['headers']['status-code']); | ||
| $this->assertEquals($cookie, $response['body']); | ||
|
|
||
|
|
||
| $cookie = 'cookie1=value1;cookie2=value2'; | ||
| $response = $this->client->call(Client::METHOD_GET, '/cookies', [ | ||
| 'Cookie: ' . $cookie | ||
| ]); | ||
| $this->assertEquals(200, $response['headers']['status-code']); | ||
| $this->assertEquals('cookie1=value1; cookie2=value2', $response['body']); | ||
| $this->assertEquals($cookie, $response['body']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's cover case sensitivity of keys, inclusion of other attributes like path, domain, httponly, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added case sensitivity, and few more. Attributes like path and stuff is for Set-cookie. those are given to browser, to manage cookies well, but aren't sent back to server in cookie header
Removes Swoole's cookie parsing to allow us to proxy raw cookie as is