Support for resume in HTTP-server

Martin v. Loewis martin at v.loewis.de
Tue Feb 26 04:43:59 EST 2002


"Thomas Weholt" <thomas at gatsoft.no> writes:

> Some web-servers ( and ftp-servers too ) support resume; the ability to get
> the rest of a previous partial download. How do I support this using
> BaseHTTPServer?

Make yourself familiar with RFC2068. The client includes a Range
header (14.36) in the request; the server will then reply with a 206
response (Partial Content), and typically include a Content-Range
header in the response (see 10.2.7 for other valid responses). Note
that you may also want to react on the If-Range header.

BaseHTTPServer does not offer any provisions for that protocol; you
need to implement it in your do_GET method.

Regards,
Martin



More information about the Python-list mailing list