The CGI specification allows for a CGI script to return a 'Location' header which refers to a location within the local web server. Quoting the RFC:
"""If the Location value is a path, then the server will generate the response that it would have produced in response to a request containing the URL""" In Apache this is honoured when the Status returned by the CGI script is also 200. The end result is that rather than sending a redirect back to the web client, Apache will trigger a new sub request against the path (as a GET request) and return the result of that to the web client. Although the WSGI specification doesn't mention any requirement for a WSGI adapter for a web server to do the same thing, it may be an interesting thing to consider for a future version of the WSGI specification. Does anyone know of any WSGI adapter which currently implements this, besides CGI/WSGI adapters which by virtue of CGI specification should implement it? Has anyone used this convention internal to a WSGI stack as a means of performing local redirection, thereby avoiding forcing the client to do the redirect? Does anyone think this would be nice extension for a WSGI adapter written against current specification to implement even if not necessarily portable? Graham _______________________________________________ Web-SIG mailing list [email protected] Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com
