Justudo has asked for the wisdom of the Perl Monks concerning the following question:
my $start_dir = $q->param("dir"); my @search_string = split / /,$q->param("search_string"); my $search_type = $q->param("search_type"); my $start_num = $q->param("start_number"); if ( ! defined ($start_num) ) { $start_num = 0; } @search_string = getWords(@search_string); my $search_url = $c{url}{find_cgi}."?dir=$start_dir&search_type=$searc +h_type&search_string=".fmtSS(@search_string); my $cookie_name = $q->param("search_string")."_dir_".$start_dir; my $cookie_data = $q->cookie($cookie_name); if ( defined ($cookie_data) ) { my %cookie_hash = %{ thaw $cookie_data }; my @search_result = computeRank($search_type,%cookie_hash); printScore($start_num,$search_url,$c{search_list_length},@sear +ch_result); exit; } my %word_score = getWordScore(...........); if ( %word_score ) { my @search_result = computeRank($search_type,%word_score); $cookie_data = freeze \%word_score; my $search_cookie = $q->cookie(-name=>$cookie_name,-value=>$co +okie_data); printScore($start_num,$search_url,$c{search_list_length},@sear +ch_result); } else { print "<p>No results found"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Getting HTTP 400 Bad Request after a few times page reloads
by zakzebrowski (Curate) on Nov 18, 2003 at 19:14 UTC | |
|
Re: Getting HTTP 400 Bad Request after a few times page reloads
by beebware (Pilgrim) on Oct 19, 2002 at 10:52 UTC | |
by Justudo (Novice) on Oct 19, 2002 at 15:42 UTC |