Fix generic download_file bug
ready to refactor template
Fix missing local.request and local.response bug