sammacbeth / dat-fox

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

Extract hostname with URL #45

Open da2x opened 4 years ago

da2x commented 4 years ago

Don’t use the host (can contain :$port_number) but the hostname.

sammacbeth commented 4 years ago

This change would mean that sites hosted on a non-standard port would no longer have their dat version detected, correct? Was there a specific case you observed that this change aims to fix?

da2x commented 4 years ago

This change aligns the behaviour with dat-dns.

RFC5785 says to use HTTP or HTTPS but to discover services for a hostname. Web services running on non-standard ports aren’t supposed to be used for service auto-discovery.

sammacbeth commented 4 years ago

Thanks for the explanation. In that case shouldn't the discovery stop if a non-default port is given?