code: def _conditional_error(self, req, response):
          
          if not req or req.sent_headers:
              return
  
          try:
              req.simple_response(response)
          except errors.FatalSSLAlert:
              pass
          except errors.NoSSLError:
              self._handle_no_ssl(req)
docs: Respond with an error.
  
          Don't bother writing if a response
          has already started being written.