3 ms·
Ask PG: Why when I go to /CLASSIC does it show "Unknown"?
I had my caps lock on today and went to http://news.ycombinator.com/CLASSIC instead of http://news.ycombinator.com/classic and all I got was a white page saying "Unknown." I just checked and this happens with several urls (http://news.ycombinator.com/LEADERS, for example).
I'm a Windows guy and IIS (the Windows built-in web server) isn't case sensitive. I also don't care to search around and figure out what web server you are using (apache?). So the question is: is this by design or accident? And if it's by design, why?
And BTW - I don't care one whit if you fix it or don't; it doesn't affect my usability at all. I was just curious.
- jgrahamc 17y agoIf you look in the source code of this site you'll discover that it doesn't lowercase that part of the URL: (def parseurl (s) (let (type url) (tokens s) (let (base args) (tokens url #\?) (list (sym (downcase type)) (sym (cut base 1)) (if args (parseargs args) nil))))) In fact it only calls 'downcase' on the type (which is the HTTP verb).