diff --git a/gns3server/handlers/api/project_handler.py b/gns3server/handlers/api/project_handler.py index ea9f4132..3c4a0fa2 100644 --- a/gns3server/handlers/api/project_handler.py +++ b/gns3server/handlers/api/project_handler.py @@ -361,8 +361,8 @@ class ProjectHandler: pm = ProjectManager.instance() project = pm.get_project(request.match_info["project_id"]) - response.content_type = 'application/gns3z' - response.headers['CONTENT-DISPOSITION'] = 'attachment; filename="{}.gns3z"'.format(project.name) + response.content_type = 'application/gns3project' + response.headers['CONTENT-DISPOSITION'] = 'attachment; filename="{}.gns3project"'.format(project.name) response.enable_chunked_encoding() # Very important: do not send a content length otherwise QT close the connection but curl can consume the Feed response.content_length = None diff --git a/tests/handlers/api/test_project.py b/tests/handlers/api/test_project.py index cf952794..90a4a554 100644 --- a/tests/handlers/api/test_project.py +++ b/tests/handlers/api/test_project.py @@ -294,8 +294,8 @@ def test_export(server, tmpdir, loop, project): response = server.get("/projects/{project_id}/export".format(project_id=project.id), raw=True) assert response.status == 200 - assert response.headers['CONTENT-TYPE'] == 'application/gns3z' - assert response.headers['CONTENT-DISPOSITION'] == 'attachment; filename="{}.gns3z"'.format(project.name) + assert response.headers['CONTENT-TYPE'] == 'application/gns3project' + assert response.headers['CONTENT-DISPOSITION'] == 'attachment; filename="{}.gns3project"'.format(project.name) with open(str(tmpdir / 'project.zip'), 'wb+') as f: f.write(response.body)