* Treat major, minor numbers of HTTP version as separate integers
* Fix errors if version string is "HTTP/1.2.3" or even simply "BLAH".
* send_error() checks if 'self.command' is a
HEAD. However, if there's an error parsing the first line of the
HTTP request the self.command wasn't set yet; force
self.command to be initialized to None.
added test script and expected output file as well
this closes patch 103297.
__all__ attributes will be added to other modules without first submitting
a patch, just adding the necessary line to the test script to verify
more-or-less correct implementation.
If you send something like "PUT / HTTP/1.0" to something derived from
BaseHTTPServer that doesn't define do_PUT, you will get a response
that begins like this:
HTTP/1.0 501 Unsupported method ('do_PUT')
Server: SimpleHTTP/0.3 Python/1.5
Date: Tue, 30 Mar 1999 18:53:53 GMT
The server should complain about 'PUT' instead of 'do_PUT'. This
patch should fix the problem.