Skip to content

Instantly share code, notes, and snippets.

@josiahcarlson
josiahcarlson / chunked_server_test.py
Last active November 7, 2024 04:29
Use some standard Python libraries to implement a chunked-transfer encoding web server with partially-working gzip support
'''
chunked_server_test.py
Copyright August 3, 2012
Released into the public domain
This implements a chunked server using Python threads and the built-in
BaseHTTPServer module. Enable gzip compression at your own peril - web
browsers seem to have issues, though wget, curl, Python's urllib2, my own
async_http library, and other command-line tools have no problems.