You are viewing a plain text version of this content. The canonical link for it is here.
Posted to asp@perl.apache.org by Philip Mak <pm...@aaanime.net> on 2003/09/29 08:42:10 UTC
$Response->End bug?
In Apache::ASP 2.55, if I have the following ASP script:
This is a blank page.
<%= $Response->End %>
and then I load it, nothing will be displayed.
The same thing happens with this ASP script:
<my:page title="Blank Page">
This is a blank page.
<%$Response->End%>
</my:page>
where my:page is an XMLSub.
This is proving problematic on my website because sometimes, in the
middle of a script it decides that there is an error condition and
aborts, so I want to $Response->Clear, print an error message and
$Response->End, but calling $Response->End causes a completely blank
page to be returned.
Is this a bug in Apache::ASP? Or should I not be calling
$Response->End in the middle of a script, and rather I should redesign
the script such that all error checking is done at the beginning?
---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org
Re: $Response->End bug?
Posted by Josh Chamas <jo...@chamas.com>.
Philip Mak wrote:
> In Apache::ASP 2.55, if I have the following ASP script:
>
> This is a blank page.
> <%= $Response->End %>
>
> and then I load it, nothing will be displayed.
>
> The same thing happens with this ASP script:
>
> <my:page title="Blank Page">
> This is a blank page.
> <%$Response->End%>
> </my:page>
Hi Philip,
I have run into similar problems & I don't have a good solution.
The problem is that the output generated between an XMLSubs tag
is buffered so that it can be passed to that tag subroutine.
A call to $Response->End exits the script processing prematurely
not even allowing the XMLSubs tag to capture the output in process.
You could try a <% return; %> instead of $Response->End, which should
halt the XMLSubs execution as the XMLSubs block is really a
subroutine anyway ( though I do not think I have done this personally,
so I would be curious as to your results. ).
If you have any ideas about how things could be done better, I would
be happy to hear them as always.
Regards,
Josh
________________________________________________________________
Josh Chamas, Founder phone:925-552-0128
Chamas Enterprises Inc. http://www.chamas.com
NodeWorks Link Checker http://www.nodeworks.com
---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org