Integrating SimpleHTTPServer into asyncore

Rick Lee rwklee at home.com
Tue Jul 10 04:11:28 CEST 2001


This is a slightly different question about Medusa.  Is there a way to
dynamically add/remove server IP addresses to/from Medusa as it is running?

- Rick Lee
  rwklee at home.com

Ng Pheng Siong wrote:

> According to Erik Max Francis  <max at alcyone.com>:
> > Is there a standard way to integrate SimpleHTTPServer (and related
> > classes) into the asyncore poll loop, or is it just the rather obvious
> > process of creating a dispatcher that containers a SimpleHTTPServer and
> > delegates all the relevant asyncore methods to SimpleHTTPServer?
>
> Just use Medusa's http_server. Medusa does HTTP/1.1 with persistent
> connections; SimpleHTTPServer (really BaseHTTPRequestHandler) does
> HTTP/1.0 only.
>
> Some refactoring of Medusa and/or BaseHTTPRequestHandler to simplify
> writing HTTP method (GET, POST, etc.) handlers that are portable to both
> would be nice; e.g., send_header(), end_headers() versus Medusa's
> http_response object.
>
> --
> Ng Pheng Siong <ngps at post1.com> * http://www.post1.com/home/ngps
>
> Quidquid latine dictum sit, altum viditur.




More information about the Python-list mailing list