Fixed bugs and tested on Python HTTP Server