def SendCGIResponse(status, headers, content, outfile, cors_handler=None):
  if cors_handler:
    cors_handler.UpdateHeaders(headers)

  outfile.write('Status: %s\r\n' % status)
  WriteHeaders(headers, outfile, len(content) if content else None)
  outfile.write('\r\n')
  if content:
    outfile.write(content)
  outfile.seek(0)
Decorator: Make method `hookable` (i.e. extensible by another app).
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/dev_appserver_apiserver.py/SendCGIResponse--crossover with--dataset/ETHPy150Open frappe/frappe/frappe/model/document.py/Document.hook