CMSgov / price-transparency-guide-validator

Validation tool to check output files required by the price-transparency-guide
Apache License 2.0
30 stars 14 forks source link

Better file type detection when URL has query string #94

Closed mint-thompson closed 1 year ago

mint-thompson commented 1 year ago

Fixes #93.

When a downloaded file's content-type is "application/octet-stream", check the URL to try to determine file type. If the URL includes a query string, it should appear immediately after the part of the URL that has the file extension. If there is no query string, the file extension will be the last part of the URL.