Arc Forumnew | comments | leaders | submit | davidnicol's commentslogin

you could do this with netcat and a couple sh scripts, if you really wanted to

it's an interesting golf hole; as posed however the bounds of how much framework can be implied is not specified though. That would need to be part of the challenge, for a better golf hole.

-----


i stopped befoere finishing this; the middle piece could be called SILENCE. Anyway there are a variety of choices for the session model -- to keep "it should not be possible to change the behavior of the third page by editing the url in the second." we either need hard-to-guess url keys or cookies, which are essentially url keys that simple mortals are not aware of.

#!/usr/bin/perl use HTTP::Server::Singlethreaded function => { '/' => sub { $counter++; # we need a session, right? <<LIGHTNING Content-type: text/html

<html><body><form action="YouSaid/$counter" method="GET"> <input type=text name=foo> <input type=submit></form></body></html> LIGHTNING }, '/YouSaid' => sub {

    my ($foo) = $_{QUERY_STRING} =~ m/foo=(.+)/;

    <<THUNDER
Content-type: text/html

<html><body>you said: $foo </body></html>

THUNDER } };

-----