sammacbeth / dat-fox

dat:// protocol as a Firefox webextension
MIT License
250 stars 12 forks source link

.well-known/dat trouble #26

Open da2x opened 6 years ago

da2x commented 6 years ago

A number of web servers return 200 OK when they mean to return 404 Not Found. These end up producing error pages like this:

Error: Invalid .well-known/dat record, must provide a dat://{key} url

This test should probably check to see if a Dat URI is provided in the returned file or not and only return an error if the Dat URI is malformed.

https://github.com/sammacbeth/dat-fox/blob/2820121fefbcd880e197e46f79983df2132d6837/background/dat-dns.js#L11