durusmail: quixote-users: Medusa bug or user misunderstanding?
Medusa bug or user misunderstanding?
2004-01-21
2004-01-21
2004-01-21
Re: Medusa bug or user misunderstanding?
2004-01-21
2004-01-21
2004-01-21
Medusa bug or user misunderstanding?
2004-01-21
2004-01-22
Re: Medusa bug or user misunderstanding? [patch files]
2004-01-22
Jason E. Sibre (3 parts)
Re: Medusa bug or user misunderstanding? [patchfiles]
2004-02-04
2004-02-05
Medusa bug or user misunderstanding?
2004-01-22
2004-01-21
Medusa bug or user misunderstanding?
A.M. Kuchling
2004-01-21
On Wed, Jan 21, 2004 at 01:04:24PM -0600, Jason Sibre wrote:
> With Medusa, HTTP_HOST reflects the requested URL, but SERVER_NAME seems to
> be whatever Medusa deduces it to be, (the machine's hostname, I guess) or
> whatever is specified as the server name in the Medusa setup/construction
> (I'm not so sure about that, as I haven't dug much, yet).

Looks like the code in medusa_http.py is broken in this respect:

        environ = {'REQUEST_METHOD': request.command,
                   ...
                   'SERVER_NAME': self.server.ip or socket.gethostname(),
                   }

This should probably be something like:
msg.get('Host') or self.server.ip or socket.gethostname() instead (untested
-- you'll have to test it and submit a patch).

The QuixoteHandler docstring reads:

            Publish the specified Quixote publisher.  'server_name' will
            be passed as the SERVER_NAME environment variable.

but this is a lie and should be deleted or rewritten; server_name is really
used as the name of the web server software, such as Apache/0.1.2 or
Quixote/demo.


--amk





reply