6 ms·
Awesome, glad to hear it! Let me know if you have any suggestions for improvements.
by mholt 6y ago
Awesome, glad to hear it! Let me know if you have any suggestions for improvements.
- kuschku 6y agoHow about supporting absolute hostnames? Even this site (https://news.ycombinator.com./ https://news.ycombinator.com./) supports them just fine, only Caddy doesn’t. Caddy does it so badly that the HSTS preload for caddyserver.com is interpreted by browsers as applying to caddyserver.com. (which is correct), but caddy won't actually serve that spec-compliant website: https://caddyserver.com./ https://caddyserver.com./ (just throws an SSL error)
- tialaramex 6y agoThe specification explicitly says what you want is the Wrong Thing™. The designers of SNI didn't leave this vague, they spelled it out first in RFC 3546 and most recently in RFC 6066 https://tools.ietf.org/html/rfc6066#section-3 https://tools.ietf.org/html/rfc6066#section-3 > "HostName" contains the fully qualified DNS hostname of the server, as understood by the client. The hostname is represented as a byte string using ASCII encoding without a trailing dot. † So, when your web browser sends the hostname "news.ycombinator.com." that's not an "absolute hostname" that's just an error. Maybe you can demand that web browsers stop doing that, but they'll likely tell you they don't care, and you should stop writing URLs incorrectly. † The trailing dot rule was in every version, but earliest sources talked about using UTF8 because they pre-date the insight that all this backend (ie not human-facing) stuff can use A-labels which are ASCII and avoid any complicated Unicode problems. This version just says to use ASCII here.
- kuschku 6y agoIt's not just SNI that's the issue. Caddy also can't handle Host headers with trailing dots, where the spec explicitly states those should be handled. So while the SNI error is clearly on browsers (and bugs have been already filed), the Host header issue is clearly on caddy (which caddy sees as wontfix)
- francislavoie 6y agoHonestly, in the 5+ years of Caddy, you're the only person I've ever seen complain about this. And you're relentless about it. You bring it up on every thread on HN that ever has a mention of Caddy. It's very annoying. That said, you can just make a site block with that host label and Caddy will handle it just fine. You just need to explicitly ask Caddy for it. example.com, example.com. { ... }
- kuschku 6y ago> That said, you can just make a site block with that host label and Caddy will handle it just fine. You just need to explicitly ask Caddy for it. That's what mholt said as well: It's the site maintainers task to fix it. Yet caddyserver.com still doesn’t support it. > you're the only person I've ever seen complain about this I didn’t actually find the bug myself, someone else did first, but it’s something that’s been annoying me for quite a bit. > You bring it up on every thread on HN that ever has a mention of Caddy. It's very annoying. It’s definitely a red flag something people should know before using caddy, as it’s a sign caddy will also interpret other specs funnily.
- francislavoie 6y ago> Yet caddyserver.com still doesn’t support it. Right, because Matt (and the large majority of everyone on the internet) doesn't care. > It’s definitely a red flag something people should know before using caddy, as it’s a sign caddy will also interpret other specs funnily. Pure FUD. It's such a non-issue. As you've been told many times.
- kuschku 6y ago> Pure FUD. It's such a non-issue. As you've been told many times. If it's such a non-issue, why did matt say he wouldn't accept a PR that'd fix this?
- francislavoie 6y agoBecause it would add unnecessary complexity to the system. It's a waste of time.