Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use file extension from content-type header instead of giving up #54

Merged
merged 2 commits into from
Sep 9, 2023

Conversation

iandees
Copy link
Member

@iandees iandees commented Sep 9, 2023

Currently, when a source file's content-disposition response header has a file extension that disagrees with the content-type response header we give up and use .txt, which causes confusion later in the download/conform pipeline.

Instead of giving up, this switches to use the file extension calculated from the content-type.

This is meant to handle the errors seen in openaddresses/openaddresses#6925

@iandees
Copy link
Member Author

iandees commented Sep 9, 2023

In the linked PR, the content-type header gave us .json and the content-disposition header gave us .geojson. They diagreed, but resolve to essentially the same thing.

@iandees iandees merged commit c7a5d93 into master Sep 9, 2023
1 check passed
@iandees iandees deleted the use-content-disposition-extension branch September 9, 2023 14:04
@iandees iandees changed the title Use file extension from content disposition header instead of giving up Use file extension from content-type header instead of giving up Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant