[medusa] Invalid protocol in query results in exception

Sam Rushing rushing@n...
Fri, 13 Jul 2001 01:11:48 -0700


---------------------- multipart/alternative attachment
max@a... wrote:

> Sending
> GET / 1.0\r\n\r\n
> instead of
> GET / HTTP/1.0\r\n\r\n
> to Medusa 3.41 results in:
> [...]

> which closes the HTTP connection rather than just responding with a
> 400 (Bad Request).

Here's a quick fix:

Index: http_server.py
===================================================================
RCS file: /usr/local/cvsroot/medusa/http_server.py,v
retrieving revision 3.41
retrieving revision 3.43
diff -r3.41 -r3.43
9c9
< RCS_ID = '$Id: http_server.py,v 3.41 2001/04/16 03:41:29 rushing Exp $'
---
> RCS_ID = '$Id: http_server.py,v 3.43 2001/07/13 08:02:38 rushing Exp $'
107c107
< if m.end() != len(self.uri):
---
> if not m or m.end() != len(self.uri):
116c116
< if m.end() == len(line):
---
> if m and m.end() == len(line):
692c692
< if m.end() == len(r):
---
> if m and m.end() == len(r):

-Sam


---------------------- multipart/alternative attachment
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail-21/medusa-dev/attachments/192ba923/attachment.html

---------------------- multipart/alternative attachment--