You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Neil Gunton <ne...@nilspace.com> on 2001/02/05 21:41:49 UTC

Problem with EmbperlObject files

Gerald,

The following problem may or may not be related to the other stuff which
we are looking at. But I have been able to reproduce it in a minimal
case. Consider the following setup:

/base.html

	[- Execute ('security.html') -]

/security.html
	
	Security

/foo/security.html

	foo/Security
	<P>
	[- Execute ('../security.html') -]

/foo/bar/

There is no security.html in /foo/bar/. If you load the root, /, you
get:
	
	Security

If you load /foo/, you get:

	foo/Security
	
	Security

This is ok. But now if you load up /foo/bar/, you get the following:

	foo/Security
	
	foo/Security
	
	Security

In other words, /foo/security.html is being executed twice for some
reason. I believe this is the minimal case for the problem, though in my
larger website it took me a while to nail it down.

Is this expected behavior? It is non-intuitive to me. It appears that
somehow the cache is getting confused because the request is for
/foo/bar/, where there is no security.html. So, Embperl goes up to the
parent directory and finds an instance of security.html there. But then,
when executing ../security.html it is somehow seeing itself again and
being repeated. Yet, this only happens once, it is not an infinite
recursion... very strange.

Any ideas most welcome.

TIA

-Neil

Re: Problem with EmbperlObject files

Posted by Neil Gunton <ne...@nilspace.com>.
> >
> > The following problem may or may not be related to the other stuff which
> > we are looking at.
> 
> It wasn't related. It was an error in the way Embperl had handled the
> searching for the ../ case. I have fixed it in the current cvs version.
> 
> Gerald

Yes, testing the latest CVS with my little test case this seems to have
been fixed now. Great! I will go and do more extensive testing with my
real sites, but I think you nailed it.

Thanks!

-Neil

Re: Problem with EmbperlObject files

Posted by Gerald Richter <ri...@ecos.de>.
Neil,

>
> The following problem may or may not be related to the other stuff which
> we are looking at.

It wasn't related. It was an error in the way Embperl had handled the
searching for the ../ case. I have fixed it in the current cvs version.

Gerald

-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------