def set_vary_header(response, header_name):
    varies = response.headers.get("Vary", "")
    varies = [x.strip() for x in varies.split(",") if x.strip()]
    if header_name not in varies:
        varies.append(header_name)
    response.headers['Vary'] = ", ".join(varies)
Add a Vary header to a response
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/cherrypy/cherrypy/lib/__init__.py/set_vary_header