Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Demystified

Authors: Andrew Oppel

1st Edition

0072253649, 9780072253641

More Books

Students also viewed these Databases questions

Question

Why is it important to match sources and methods of recruitment?

Answered: 1 week ago