This post originated from an RSS feed registered with Python Buzz
by Rand Anderson.
Original Post: When is localhost not localhost?
Feed Title: Python Postings
Feed URL: http://www.executableabstractions.com/weblog/Python/rss.xml
Feed Description: On my explorations of python
I am a long-time Internet Explorer user, but I have in the past few months really taken to Firefox. I still use IE for a few particular sites for which Firefox has some annoyances, but Firefox's speed and tabbed browsing, especially the ability to persist a set of urls to open as tabs in a single window on startup, is behind it being my primary browser these days.
Here's one of the problems I recently ran into.
Via Kevin Altis, I found this coolio Python magic for creating an instant web-server. On my WinXP system however, it fails silently (aside: why is this?). But the first time through, not knowing exactly what to expect, I went ahead and navigated a new browser tab to my localhost at the port listed in the example, by entering this URL: http://localhost:8000.
Fancy my surprise when Firefox took me not to the local dir I had started my instant web server in, but a generic site across world named 'localhost' in a top-level-domain of '.be'.
So the answer to the title of this post is, when you're in Firefox 0.8. :-/
Not so cool.
I tried entering a localhost URL at an unassigned port in IE and IE responds more appropriately with a cannot-find-server error.
BTW, Christian in the comments at Simon Brunning's Small Values of Cool provides the secret sauce for getting this to work on WinXP. This is sweet.