When exception occur the session is broken. Refreshing this page will redo an action with broken session.
How to reproduce: generate app and apply this patch:
```diff
--- a/lib/MyApp/Controller/Example.pm
+++ b/lib/MyApp/Controller/Example.pm
@@ -5,6 +5,14 @@ use Mojo::Base 'Mojolicious::Controller';
sub welcome {
my $self = shift;
+ my $s = $self->session;
+
+ $s->{ incomplete_data }++;
+ die "Redo the action - refresh page. " .$s->{ incomplete_data };
+
+ delete $s->{ incomplete_data };
+ $s->{ done } = 1;
+
# Render template "example/welcome.html.ep" with message
$self->render(msg => 'Welcome to the Mojolicious real-time web framework!');
}
```
How to repeat first request with the same session data? (or: how to prevent cookie update when exception occur: https://metacpan.org/source/SRI/Mojolicious-7.70/lib/Mojolicious/Controller.pm#L213)
When exception occur the session is broken. Refreshing this page will redo an action with broken session.