1. Engineering
  2. Computer Science
  3. http server implement in javapythongo a simple http 10 server...

Question: http server implement in javapythongo a simple http 10 server...

Question details

HTTP Server Implement in Java/Python/Go a simple HTTP 1.0 server (that listens to port 80) and that can handle HTTP GET requests of browsers. Your server should be able to handle the three types of GET requests outlined below. a) Upon eceiving a web reqest o the type http://machine/doc/page (e.g. http://localhost/doc/page.html), the server will analyze the request line and search for the specified page in its local directory. If the page can be found, send it to the browser. If the file cant be found return a 404. b) Upon receiving a web request of the type http://machine/echo (e.g. http://localhost/echo), the server will return a HTML5 page that contains all the data sent by the browser. c) Upon receiving a web request of the type http://machine/log (e.g. http://localhost/log), the server will return a HTMLS page that contains a list of all the requests made to the server since it was started. Each log entry must be in a separate line. To simplify your assignment, you can Assume that only HTML5 content will be requested. Pages must be in the same directory as the server All requests are well-formed HTTP requests All requests can be handled sequentially (no need to implement multi-threaded server). Implement you assignment in Java or Go or Python using only the standard libraries.
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution