Dennis:<br>>> Did your fix not get to git yet?<br><br>Jonathan:<br>> It's there now. On my machines, Session::State::Cookie still isn't<br>> working, so tests fail for me. But if they pass for you, <br>> you should be good to go. <br><br>I bypassed s-s-cookie, manually installed c-p-FormCanary, but<br>the magic isn't working for me yet.<br><br>I have a question based on this code snippet:<br> #=====================================<br> if ($content_type =~ /html/){<br> some stuff here...<br> # add the input tags to the body<br> my $body = $c->response->body;<br> $body =~ # yuck.<br> s{</form>}<br> {<input type="hidden" name="$name" id="$name" value="$canary" /><br> </form>}g;<br> $c->log->debug("$body"); # << I added
debug msg<br> $c->response->body($body);<br> }<br> return $c->NEXT::finalize_session(@_);<br> #=====================================<br><br>Here's what I do not understand:<br><br>The "canary" hidden input tag IS ADDED, according to $c->log->debug("$body")<br><br>But the "canary" hidden input tag DOES NOT show up in the page <br>sent to the browser? Why would that be? <br><br>I'm using TT for view; I have an empty <br>sub end : ActionClass('RenderView') { }<br>c-p-renderview just returns 1 if length $c->response->body,<br>so probably something's working in a way I don't get yet, <br>or works in a way different from what I *think* is happening.<br><br>I copied some of FormCanary's code into a webcard widget, <br>twiddled a bit, and it works great. I haven't written any <br>action classes, but it would be really nice to use this as <br>an action class (which I see is on the todo list). I'll <br>mess around some more with this,
see what else I can learn.<br><br>/dennis<br>