in reply to how to improve my script
skx, .. traversals didn't work when I checked it in firefox. Maybe it was firefox that removed those ..'s . It works while using telnet. :( Thanks for the heads up. That'll be my first priority.
And thanks, afoken, for the suggestions. I definitely have my hands full with your suggestions. For a novice like me, without any prior programming experience, it'll take a bit of time to correct all these. I'll be back after I make the recommended changes.
I also want to make it clear that I don't plan to write a full fledged web server. Just want to support GET requests and write good code.
Thank you all once again.