[mod_python] Sugestion about publisher

Rich Salz rsalz at caveosystems.com
Fri Jan 5 12:49:31 EST 2001


Very very cool.  A couple of (minor) things.

> +        loc = 'http://' + _req.connection.server.server_hostname
                  ^^^^^^^^^^
		should get it out of the uri, since it might be https

> +        loc = loc + ':' + str(_req.connection.server.port)
> +        loc = loc + _req.uri + '/index_html'
> +        _req.headers_out['Location'] = loc
> +        raise apache.SERVER_RETURN, apache.HTTP_MOVED_PERMANENTLY
					^^^^^^^^^^^^^^^^^^^^^^^^^^^
should be moved_temporarily, I'm fairly sure.

The whole thing should be controlled by a mod_python auto_index option,
or perhaps based on the DirectoryIndex apache config option?

Anyhow, something like this should go into the code!
	/r$



More information about the Mod_python mailing list