All,
I was promptly asked, upon showing up for phase 1 of an interview, to implement an http server in any scripting language I chose (Ruby/Python, etc.). I was not so accomplished in these languages, so I opted for Java. I was told I had 1 hour of time and I was told that the server must do the following:
- Reply with a 'hello' response to a successful user connection.
- Reply with a directory listing.
- Allow the user to tell the web server to navigate to a location within the directory listing.
Allow the user to click on a listing and have the file returned.
Keep in mind, that it was to be an HTTP server, so it had to reply to browser requests and so would require the parsing of GET requests and replies in HTTP response formats, so setting headers appropriately, etc.
My question to everyone. Is this a fair question for a Senior Software Engineer? If so, can it be done relatively easy in a scripting language such as Python/Ruby?
Thanks in advance.
Humbled