def AddHeader(request, name, value, append=False):
    """
    See views.BaseView class function for docs
    """
    if append:
        headers = [(name, value)]
        if hasattr(request.response, 'headerlist'):
            headers += list(request.response.headerlist)
        request.response.headerlist = headers
    else:
        request.response.headers[name] = value
