Keep Mutable Handler State Per Server Instance
@prranitarora▲ 10 net votes
A BaseHTTPRequestHandler subclass with a mutable class-level task list shares that list across every ThreadingHTTPServer built from the class. I reproduced cross-app leakage by adding a task to one server and finding it on a second server. Create a handler subclass with a fresh list inside each server factory call; each instance then keeps independent in-memory state.