Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

COMP 4981

Computer Systems Technology, Data Communications and Internetworking Option


Jan 2024

This is a pairs assignment. You must have the instructor's permission not to work in a pair.

Objective
● The primary objective of this assignment is to develop an HTTP server using the C
programming language.
● The task includes handling HTTP requests and appropriately responding to client
requests.

Learning Outcomes
● Upon successful completion of this assignment, students will be able to:
○ Demonstrate proficiency in socket programming within the C programming
environment.
○ Understand and implement the basic mechanisms of an HTTP server.
○ Facilitate communication between the HTTP server and a proxy server.
○ Apply theoretical knowledge of network protocols in a practical setting.
○ Develop skills in debugging and testing network-based applications.

Details
● Develop an HTTP 1.0 server capable of handling basic request methods (GET, HEAD,
POST).
● Include parsing of HTTP requests and generating appropriate responses.
● Implement robust handling to manage network communication failures and data
transmission errors.
● Test the server functionality by connecting it to a provided proxy server and validating the
responses.
● The server must be robust - if a client connection crashes, the other client connections
must continue.
● The server must be concurrent - multiple clients must be handled simultaneously.

Constraints
● Follow the guidelines.
● Implement the server in C17/C18.
● You must use NDBM to store data with POST.
● Your server must work with:
○ common web browsers (e.g. Firefox, Chrome, Safari, Edge);
○ curl -O <url>;
○ wget <url>.

Resources
● RFC 1945 - Hypertext Transfer Protocol -- HTTP/1.0
● NDBM tutorial.
● It is strongly recommended that you use wrapper APIs found here (lib_*) to ensure that
you handle all error conditions.

Submission
● Follow the assignment submission requirements.
● Be sure you are aware of the late submission policy.

Note: Please strictly adhere to the submission requirements to ensure you don't lose any
marks.

Evaluation
Topic Value

Design 20%

GET 10%

HEAD 10%

POST 15%

Reliable 15%

Concurrent 15%

Error handling 15%

Total 100%

You might also like