durusmail: quixote-users: Re: 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
Re: Medusa bug or user misunderstanding?
Graham Fawcett
2004-01-21
Jason E. Sibre wrote:
> Ah!
>
>
>
>>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(),
>>                 }
>
>
>
> I didn't even think to look at that part.
>
> I'll check it out and send the patch, once I have it doing what I think is
> right.  (Which means a bit of reading to be sure what I think is right,
> really is right!)

Right!

Andrew's suggestion looks like a winner: it gives a nice failover in
case 'Host' is not included in the request header.

Although I like it, would it violate the 'no-magic' rule? A request that
needed the failover would definitely violate HTTP/1.1 (ยง14.23, "A client
MUST include a Host header field in all HTTP/1.1 request messages");
perhaps a 400 Bad Request would be more appropriate than a failover.

That being said, I still think it's right. ;-) Pending discussion, I'll
get around to patching my quixote.server.medusa proposal, which also
suffers from this error.

-- Graham



reply