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

cpg.root can't access cpg properties #116

Closed
ghost opened this issue Feb 24, 2005 · 1 comment
Closed

cpg.root can't access cpg properties #116

ghost opened this issue Feb 24, 2005 · 1 comment

Comments

@ghost
Copy link

ghost commented Feb 24, 2005

Originally reported by: Anonymous


cpg.root is instantiated before the web server is started so cpg.foo is not available in the root class.
I noticed this when I subclassed my root class from csauthenticate and made some stuff in my version of csauthenticate try to access cpg.configOption.sessionCookieName in it's init.

It seems that the structure of CP2 should be changed so that the root class is passed to cp when the server is started so it can be instantiated later on after things are set up around it.

Reported by mischko chappie@mischko.com


@ghost
Copy link
Author

ghost commented May 20, 2005

Original comment by Anonymous:


If I understand this correctly, it can be solved by the application code itself. Simply call cpg.server.start before binding cpg.root. There's nothing in the core that relies on cpg.root being populated before the server starts. The only miniscule issue is that someone could request a page in the microsecond between the two calls, and be rejected.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants