[Home]GetHttpHeader

UseModWiki | RecentChanges | Preferences

Return HTTP-Header, with "text/html" etc.

Also handles cookies (SetCookie).

 sub GetHttpHeader {
   my $cookie;
   if (defined($SetCookie{'id'})) {
     $cookie = "$CookieName?="
             . "rev&" . $SetCookie{'rev'}
             . "&id&" . $SetCookie{'id'}
             . "&randkey&" . $SetCookie{'randkey'};
     $cookie .= ";expires=Fri, 08-Sep-2010 19:48:23 GMT";
     if ($HttpCharset ne '') {
       return $q->header(-cookie=>$cookie,
                         -type=>"text/html; charset=$HttpCharset");
     }
     return $q->header(-cookie=>$cookie);
   }
   if ($HttpCharset ne '') {
     return $q->header(-type=>"text/html; charset=$HttpCharset");
   }
   return $q->header();


UseModWiki | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited March 8, 2010 7:06 pm by MarkusLude (diff)
Search: