You are viewing a plain text version of this content. The canonical link for it is here.
Posted to asp@perl.apache.org by Alexander Shipitsyn <sh...@omskreg.ru> on 2002/05/21 14:03:00 UTC
Bug with return from
Hello, asp-info! Good afternoon all!
I have found the bug in Apache::ASP. It appears, "return" command
incorrectly leaves from <!--#include file="some.inc" --> - executing
of all code is finished.
To reproduce this mistake, make so:
File 1.asp
-----------------
111-A
<% $main::Response->Include("2.inc"); %>
111-B
<!--#include file="2.inc"-->
111-C
File 2.inc
-----------------
222-A
<% return; %>
222-B
In result on request 1.asp it is received:
111-A 222-A 111-B 222-A
Thus, Response->Include works as it is necessary, and <!--#include --> is not present - a line 111-C
has disappeared for ever.
Thus, it is impossible to execute "return" in files which were
called using <!--#include file-->.
And how at you?
--
Best regards,
Alexander mailto:ship@omskreg.ru
---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org
Re: Bug with return from
Posted by Joshua Chamas <jo...@chamas.com>.
Sven Koehler wrote:
>
> that's the meaning of <!--#include--> from my point of view ...
> Response->Include may have a different behaviour.
>
Sven is correct.
Use $Response->Include() if you want a return to just exit
from the current executing include. In this way a $Response->Include()
call is like calling a subroutine, but <!--#include ... --> is
different in that file files are merged together into one script.
--Josh
_________________________________________________________________
Joshua Chamas Chamas Enterprises Inc.
NodeWorks Founder Huntington Beach, CA USA
http://www.nodeworks.com 1-714-625-4051
---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org
Re: Bug with return from
Posted by Sven Koehler <sk...@upb.de>.
> Thus, Response->Include works as it is necessary, and <!--#include --> is not present - a line 111-C
> has disappeared for ever.
>
> Thus, it is impossible to execute "return" in files which were
> called using <!--#include file-->.
>
> And how at you?
to me it doesn't seem to be a bug...
include seems to work fine.
the files are merged toghether to one big file:
111-A
<% $main::Response->Include("2.inc"); %>
111-B
222-A
<% return; %>
222-B
111-C
that's the meaning of <!--#include--> from my point of view ...
Response->Include may have a different behaviour.
---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org