Skip to content

Commit 084e4f6

Browse files
committed
Update EDR Content Type
1 parent c11a3fb commit 084e4f6

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

pygeoapi/api/environmental_data_retrieval.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,8 +494,14 @@ def get_collection_edr_query(api: API, request: APIRequest,
494494
HTTPStatus.INTERNAL_SERVER_ERROR, headers, request.format,
495495
'NoApplicableCode', msg)
496496

497+
headers['Content-Type'] = formatter.mimetype
498+
497499
if formatter.attachment:
498-
filename = f'{dataset}.{formatter.extension}'
500+
if p.filename is None:
501+
filename = f'{dataset}.{formatter.extension}'
502+
else:
503+
filename = f'{p.filename}'
504+
499505
cd = f'attachment; filename="{filename}"'
500506
headers['Content-Disposition'] = cd
501507

0 commit comments

Comments
 (0)