Skip to content
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

Don't send empty cookie on every request #116

Merged
merged 1 commit into from
Jan 27, 2020

Conversation

joehoyle
Copy link
Member

When not using PHP_XDEBUG_ENABLED, we currently send a blank cookie on every request. This is wasteful, but also means you won't get Batcache locally because of cookies being set, and can snag other problems too.

I don't really see why we even need to set this at all. In this context.

When not using `PHP_XDEBUG_ENABLED`, we currently send a blank cookie on _every_ request. This is wasteful, but also means you won't get Batcache locally because of cookies being set, and can snag other problems too.

I don't really see why we even need to set this at all. In this context.
@joehoyle joehoyle requested a review from roborourke January 24, 2020 15:44
@joehoyle joehoyle added this to the 4.0 milestone Jan 24, 2020
@roborourke
Copy link
Contributor

This is to unset the cookie if previously set when you start without xdebug, so I’d say detect if it’s actually set first then unset it in that scenario. The reason for doing this is so you don’t need one of those browser addons to enable / disable xdebug logging when you start the server with xdebug. Basically avoids an additional manual step.

@joehoyle
Copy link
Member Author

joehoyle commented Jan 25, 2020 via email

@roborourke
Copy link
Contributor

Good point 🤦‍♂

@roborourke
Copy link
Contributor

Now wondering if we should check whether the XDEBUG_SESSION cookie is set before sending it with a new expiry every time when you do have xdebug enabled.

@joehoyle
Copy link
Member Author

Mmm maybe. Sounds like a follow-up issue / PR :D

@roborourke roborourke merged commit 0dce2bd into master Jan 27, 2020
@roborourke roborourke deleted the dont-always-send-xdebug-cookie branch January 27, 2020 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants