Question: In the HTTP server exercise, we examine the HTTP protocol. The root content is at http: / / data . cyber.org.il / networks / webroot

In the HTTP server exercise, we examine the HTTP protocol. The root content is at http://data.cyber.org.il/networks/webroot.zip. Skeleton code is available at https://data.cyber.org.il/networks/http_server.py FIXED_RESPONSE ="HTTP/1.1200 OK\r Content-Length: 6\r Content-Type: text/html; charset=ISO-8859-1\r \r Hello!" Students are required: 1. To implement an HTTP server in Python that uses the root content as its resources. Your code should Implement support serving html, jpg, css and js files. The root content contains samples of each for you to test your code on.2. Your code must support the following return codes a.200 OK b.302 Moved temporarily c.404 Not found 3. Implement GET request handling with parameters. When the following query is passed to the server, it should calculate the area of a triangle. In this example, it returns 6. Your web site shoould accept any whole integer as input. http://127.0.0.1:80/calculate-area?height=3&width=4 Check the Exercise 1. The exercise test is done through a browser, you need to make sure that the whole site downloads correctly, including clicking on the JS square. 2. If some pages do not download correctly, a partial grade will be given and no resubmission is possible. 3. Check error code 302- examine the server code and check which resource should be "relocated". Request this resource and make sure you get a 302 message. 4. Check the error code 404- Request a nonexistent resource and make sure you get a 404.5. Close the client and make sure that the server does not hang, allowing the connection of new clients. 6. When going through the code itself, we want to make sure that the functions work correctly: Check that the HTTP request is valid is performed correctly, including all fields If no specific resource is requested, a default resource is returned Problem Grading The site does not download in full the three resource types and the icon file (favicon)60 Error code 302 not received Minus 20 Error code 404 not received Minus 20 The calc area does not work on positive whole integers Minus 20 The check that the HTTP request is valid is not performed correctly Minus 20 The server does not return a default resource Minus 20 Close a client and open a new one the site

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!