Hello everyone,
This is my first post to this group. I have looked around the web for an answer to my
question but no luck :( Hopefully some here can help me.
After buying the eagle book I build a module that will parse and incomming request
from a browser, then send a frame set html page with the correct html document in a
specific frame. From browsers on my linux box everything works find. From the two
window clients I've test both Mozilla and IE6, at random times, fail to load some of
the images referenced in the html code. This only occurs when using URLs that point
to that module, even for the same module on different servers. Normal browsing does
not have this problem. Does anyone know what might be causing this?
Module:
package Apache::Content;
use strict;
use Apache::Constants qw(:common);
use Apache::URI();
use Apache::File();
sub handler {
my $r = shift;
my ($page, $adtitle, $fh);
#get the document root of the
#requested URL
my $document_root = $r->document_root;
my $uri = $r->uri;
#pars url to get form name and adtitle
if ($uri =~ m/\/content\/([^-]+)-([^-]+)/){
$page = $1;
$adtitle = $2;
}
$r->content_type('text/html');
$r->send_http_header;
my $path = $r->filename;
$path =~ s/(.*?)[^\/]+$/$1/;
#open index frameset
unless ($fh = Apache::File->new($path."index.html")){
$r->log_error("Can't open index.html: $!");
return SERVER_ERROR;
}
while (<$fh>){
#change main window from home.html to the page
#requested
#if url contained vgfrom then pass to
#vgform module (Vgform.pm)
if ($page =~ m/vgform/io){
s/src="?\/home\.html"?/src=\/$page-$adtitle/io;
}else{
s/src="?\/home\.html"?/src=\/$page/io;
}
$r->print($_);
}
return OK;
}
1;
Thanks for reading
--
Neil Watson
Network Administrator
watson-wilson.ca