"Bill McCormick" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I had a chat with Marvin. We have not made any changes in this area. The
> fact is the csp:include has always used serve files and the internal web
> server to put out any non csp includes. I would highly recommend using
> the .csp extension and letting the content be put out over csp instead.

See dev\csp\rules\basic.csr for the definition of <csp:include>. It simply
resolves to a call to ..Include() which is a final method of %CSP.Page.

 <script language=CACHE runat=SERVER>
  Do ..Include(##'..GetAttribute("PAGE")'##)
 </script>


Here's the code and method doc:

/// Include another csp page or file in the output at this point. If the url
ends in either
/// 'csp' or 'cls' then it will call the csp or cls class to generate output
skipping the
/// output of the HTML headers. If the url is a file then it uses the stream
server to output
/// this file. This url can be a relative path in which case it will be
resolved based on the
/// current page url first. This is called by the &lt;csp:include
Page="page.csp"&gt; tag.<p>
/// You can pass additional parameters to the included page by adding them
to the url to
/// call. These parameters will only exist for the included page and the
%request object is
/// restored when it returns to the calling page. For example:<p>
/// &lt;csp:include Page="page.csp?PARAM=VALUE"&gt;
ClassMethod Include(url As %String) [ Final, ProcedureBlock = 1,
ServerOnly ]
{
 Set %CSPsc=$$cspInclude^%cspServer(url)
 If $$$ISERR(%CSPsc) {
  Set %request.Data("Error:IncludePage",1)=url
  ZTrap "THROW"
 }
 Kill %CSPsc
}

So whatever filename you specify is passed into the black box that is
$$cspInclude^%cspServer. The comments indicate that a filename ending .csp
or .cls will just cause the OnPage method of the page's class to the run. A
request to include any other type of file is delegated to the stream server.
See %CSP.StreamServer.cls for details of how this works, though we'll have
to speculate about the way $$cspInclude^%cspServer might call it. Whatever,
it seems that the "serve files?" check will be applied.

John Murray
George James Software
www.georgejames.com


Reply via email to