Open DrHyde opened 11 years ago
This is annoying and session() doesn't really change the cookie at this point. Also you cannot find out from response object if a send_file call happened.
We did the following workaround in our code:
hook after => sub {
if (status == 200) {
+ return if var('no_session');
log_page(request->path);
}
};
+hook after_file_render => sub {
+ my $res = shift;
+ var no_session => 1;
+};
+
Ideally, I'd like to see send_file()'s actions postponed until after all hooks have run, but failing that, the doco should be updated to note that anything that may cause the user's cookie to change, including any changes to their session() can't be done after send_file()