|
|
[Perlfect-search] sending an HTTP charset header
webmaster perlfect-search@perlfect.com
Thu, 20 May 2004 11:48:10 -0400
Hello,
On my site, I send real http headers to declare the charset in use
instead of the meta http-equiv hack. So for the search results page, I
made the following changes. First, I added a section to conf.pl:
# The charset (character encoding scheme) for your site.
# ** Note ** : this is important to make sure user-agents can
# properly encode characters in the search results page
$CHARSET = 'iso-8859-1';
And in search.pl, I replaced 2 instances of the "content-type" lines
with this line:
print "Content-Type: text/html; charset=", $CHARSET, "\n\n";
I thought I'd ask what the developer(s) thought of this. Is there
anything crucial that I've overlooked?
Also, in a comment on results page template, there's a note about the
importance of declaring a charset to prevent cross site attacks. How is
such an attack carried out, and how does the charset prevent it? Just
curious about that.
--
webmaster/admin:
http://www.tsmchughs.com/
|
|