public function badRequest($req)
    {
        $this->state = self::STATE_ROOT;
        $this->write("400 Bad Request\r\n\r\n<html><head><title>400 Bad Request</title></head><body bgcolor=\"white\"><center><h1>400 Bad Request</h1></center></body></html>");
        $this->finish();
    }