Match lowercase subdomain against lowercase username uniphil/commit--blog

Fixes #30

There are two important parts in a URL for web servers to consider, which have slightly different rules:

  1. Subdomain: Everything after :// until the next /. The in
  2. Path: Everything after and including that / until a # if there is one. /mail/u/0/ for my inbox. The #inbox is not sent by the web browser to the server.

Subdomains have stricter rules on allowed characters and they are case-insensitive. Chromium will actually convert all alpha characters to lowercase before sending the request.

On commit--blog, each blogger gets a subdomain for their blog, and that subdomain comes from their username. Until this past Tuesday, everyone who I've convinced to sign up and try it out has had all-lowercase usernames. @pR0Ps finally bucked the trend and uncovered this issue.

The fix is simple: query the lowercased subdomain against lowercased usernames. Woo.

Wikipedia on URLs. There is a lot there. Always interesting to find out new things that seem very familiar.