+sub printheader ($) { #{{{
+ my $session=shift;
+
+ if ($config{sslcookie}) {
+ print $session->header(-charset => 'utf-8',
+ -cookie => $session->cookie(-secure => 1));
+ } else {
+ print $session->header(-charset => 'utf-8');
+ }
+
+} #}}}
+
+sub redirect ($$) { #{{{
+ my $q=shift;
+ my $url=shift;
+ if (! $config{w3mmode}) {
+ print $q->redirect($url);
+ }
+ else {
+ print "Content-type: text/plain\n";
+ print "W3m-control: GOTO $url\n\n";
+ }
+} #}}}
+