#!/usr/bin/perl # Simple script to generate a POST result. # # Depending on which button was pushed in the form, we either generate a direct # result page, or we use the pattern where the post returns a 303 redirect, # and then the resulting GET yields the true POST result. Sites do this trick # to avoid having POSTS in the b/f list, so you don't run into POSTs getting # resubmitted by accident. use CGI; $query = new CGI; $method = $query->request_method(); if ($method eq "POST") { print "Content-type: text/html\r\n"; print "\r\n"; print < Test failure: reloadresult.pl was called with an unexpected method ($method). HERE_DOC_END } elsif ($method eq "GET") { print "Content-type: text/html\r\n"; print "\r\n"; print < PASS HERE_DOC_END }