Hello,
This is my 2nd request on the below issue. I'm hoping someone out there
can help me out or point me in the right direction. I'm trying to learn
how to override a method so I can give my value rather than the one the
libwww package defaults to (see below).

Any help appreciated.
Thanks,
~jerry

-----Original Message-----
From: OK News [mailto:[EMAIL PROTECTED] 
Sent: Saturday, September 18, 2004 6:45 PM
To: [EMAIL PROTECTED]
Subject: Overriding a method (HTTP::Daemon::product_tokens

Hello,
I've read a lot of docs today and searched the web high and low but
cannot get past this problem.

I'm trying to override the product_tokens value in HTTPD::Daemon. I'm
creating a webserver and would like the 'Server' header to show my user
agent. I found the following code should be able to do this:

# my version of HTTP::Daemon with a different server name
@HTMLF::Daemon::ISA = qw(HTTP::Daemon);
sub HTMLF::Daemon::product_tokens {
  return "My Agent Name";
}

And this appears before any real script logic begins. Each time the
server starts up and I get the headers by doing 'HEAD
http://localhost:8080', I keep getting the default header 'Server:
libwww-perl-daemon/1.25'. The docs say I should be able to override
this.

Any help truly appreciated...
~jerry




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>






-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to