<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>RE: [Web-SIG] Internal redirect using Location with absolute pathand status of 200.</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Graham Dumpleton wrote:<BR>
&gt; The problem then as above is what does one do at<BR>
&gt; the boundary between a WSGI application and the<BR>
&gt; web server hosting it? Do you just always assume<BR>
&gt; a WSGI application provides an error page, or allow<BR>
&gt; some way that a WSGI application can defer to the<BR>
&gt; web server the task of generating an error page<BR>
&gt; instead?<BR>
<BR>
The web server should not be trying to correct what<BR>
the application gives it, except as absolutely necessary<BR>
to get the response on the wire, or obey the HTTP spec<BR>
(and even that's questionable). If you want consistent<BR>
error pages across an entire application or site, write<BR>
a piece of WSGI middleware which does that and explicitly<BR>
include it in your middleware graph.<BR>
<BR>
To quote the PEP:<BR>
<BR>
&nbsp;&nbsp;&nbsp; In general, servers and gateways should &quot;play dumb&quot;<BR>
&nbsp;&nbsp;&nbsp; and allow the application complete control over its output.<BR>
&nbsp;&nbsp;&nbsp; They should only make changes that do not alter the<BR>
&nbsp;&nbsp;&nbsp; effective semantics of the application's response.<BR>
&nbsp;&nbsp;&nbsp; It is always possible for the application developer<BR>
&nbsp;&nbsp;&nbsp; to add middleware components to supply additional<BR>
&nbsp;&nbsp;&nbsp; features, so server/gateway developers should be<BR>
&nbsp;&nbsp;&nbsp; conservative in their implementation. In a sense,<BR>
&nbsp;&nbsp;&nbsp; a server should consider itself to be like an HTTP<BR>
&nbsp;&nbsp;&nbsp; &quot;gateway server&quot;, with the application being an<BR>
&nbsp;&nbsp;&nbsp; HTTP &quot;origin server&quot;. (See RFC 2616, section 1.3,<BR>
&nbsp;&nbsp;&nbsp; for the definition of these terms.)<BR>
<BR>
<BR>
Robert Brewer<BR>
System Architect<BR>
Amor Ministries<BR>
fumanchu@amor.org</FONT>
</P>

</BODY>
</HTML>