Sale!

CSE312 Homework 2 Hello World Server solved

$35.00 $21.00

Category: You will receive a download link of the .ZIP file upon Payment

Description

5/5 - (1 vote)

Develop a web server that can parse requests and send responses following the HTTP
protocol.
As explained on the course website, no HTTP libraries/frameworks are allowed. You must
manually parse and write HTTP requests and responses.
Objective 1: TCP Socket Server
Write a TCP socket server in your chosen language. This TCP socket server must accept
valid TCP client connections and receive messages sent by the client. Your server does not
have to have any meaningful functionality for this objective. Printing the received messages
will suffice.
Testing Note: Any web browser is a TCP client. With your server running you can enter
“localhost:” and it will connect to your server and send a
message.
As explained on the course website, you can use libraries to setup the TCP socket server as
long as their use is a standard practice for your language of choice.
Objective 2: Hello World
Implement an HTTP server that will respond with a welcome message using your TCP
socket server. Choose a path and a message to serve such that server will respond to a
GET request for that path you server will respond with your chosen text in an HTTP
response. The message type can be plain text (eg. content type “text/plain”).
Example: GET /hello returns “Hello World!”
Testing Note: Navigating your browser to “localhost:/”
will display your message.
Objective 3: 301
Choose a second path which will redirect your users to the path you chose in objective 2.
Objective 4: 404
If a request is received for any path other than the two used in objectives 2 and 3, return a
404 response with a message saying that the content was not found. This can be a plain text
message.
Submission
To earn credit for this homework you must complete all 3 submissions.
1. Submit all the files of your site to AutoLab in a zip file
2. Submit your report to AutoLab as a txt file
3. Fill out the