-
Notifications
You must be signed in to change notification settings - Fork 24
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
sess_initialized is never reset #33
Labels
Milestone
Comments
LeSpocky
added a commit
to LeSpocky/libcgi
that referenced
this issue
Feb 16, 2017
The flag `sess_initialized` was never reset. After introducing `cgi_session_free()` we can now reset it. While at it use `stdbool.h` and make the variable a proper boolean, and also drop the not really used `sess_finitialized` variable. fixes rafaelsteil#33 Signed-off-by: Alexander Dahl <[email protected]>
LeSpocky
added a commit
to LeSpocky/libcgi
that referenced
this issue
Jul 12, 2018
The flag `sess_initialized` was never reset. After introducing `cgi_session_free()` we can now reset it. While at it use `stdbool.h` and make the variable a proper boolean, and also drop the not really used `sess_finitialized` variable. fixes rafaelsteil#33 Signed-off-by: Alexander Dahl <[email protected]>
LeSpocky
added a commit
to LeSpocky/libcgi
that referenced
this issue
Jul 12, 2018
The flag `sess_initialized` was never reset. After introducing `cgi_session_free()` we can now reset it. While at it use `stdbool.h` and make the variable a proper boolean, and also drop the not really used `sess_finitialized` variable. fixes rafaelsteil#33 Signed-off-by: Alexander Dahl <[email protected]>
LeSpocky
added a commit
to LeSpocky/libcgi
that referenced
this issue
Jul 12, 2018
The flag `sess_initialized` was never reset. After introducing `cgi_session_free()` we can now reset it. While at it use `stdbool.h` and make the variable a proper boolean, and also drop the not really used `sess_finitialized` variable. fixes rafaelsteil#33 Signed-off-by: Alexander Dahl <[email protected]>
Merged
LeSpocky
added a commit
to LeSpocky/libcgi
that referenced
this issue
Jul 12, 2018
The flag `sess_initialized` was never reset. After introducing `cgi_session_free()` we can now reset it. While at it use `stdbool.h` and make the variable a proper boolean, and also drop the not really used `sess_finitialized` variable. fixes rafaelsteil#33 Signed-off-by: Alexander Dahl <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While testing a fix for #25 I saw it does not solve the problem I actually try to solve. 😥
In a classic CGI the process is started, some things are done, the process ends, everything not released by yourself is cleaned up by the operating system. Now if you want to use libcgi together with FastCGI (this requires patches not in mainline yet) the process never ends, but the whole thing is enclosed by an endless loop. In this case the library MUST do proper bookkeeping and cleanup.
So when using libcgi in such a loop the first call to
cgi_session_start()
setssess_initialized
to true, every following call fails, becausesess_initialized
is never reset to false, which makes the whole session thing unusable.There is a second variable
sess_finitialized
which is never tested and only set to false incgi_session_destroy()
. So even if this is meant to be the same assess_initialized
it would not work, becausecgi_session_destroy()
is not called every time. Actually most of the time you don't want to destroy your session, but keep it.So there needs to be a way for resetting those flags and find a proper name for this function.
The text was updated successfully, but these errors were encountered: