contentauth / c2pa-js

JavaScript SDK for displaying and validating C2PA data
https://opensource.contentauthenticity.org
MIT License
74 stars 40 forks source link

Optimization: If HEAD request is 404, skip subsequent GET request #183

Open rokclimb15 opened 3 months ago

rokclimb15 commented 3 months ago

When loading a remote source in downloader.js, if the HTTP server responds 404 for the HEAD request, it shouldn't be necessary to make a subsequent GET request for the asset. You could short-circuit this logic to fail early.