Simple Web Client

Due: 5:00am, Friday, October 4, 2024

Get the Assignment Code

Login to your university Unix account and copy the assignment code to a location under your home directory:

The starter code for this assignment is on the Linux server here:

  /export/home/public/schwesin/cpsc328/assignments/project3

Description

The purpose of this assignment is to create a web client that can make simple HTTP GET requests. The form of the request is similar to this:

GET / HTTP/1.1\r\n
Host: example.com\r\n
Connection: close\r\n
\r\n

where example.com would be replaced with the value of the host command line argument. It is important to note that each line of the request ends with a Carriage Return - Linefeed (CRLF) sequence and that then end of the request has a single CRLF (this is how we know the header portion of the request is done.)

If we are requesting a specific resource, it would be indicated in the first line of the request as the path to the file:

GET /path/to/file.html HTTP/1.1\r\n

Here is the general flow of the program:

Specifications

Turning in the Assignment

To turn in the assignment, execute the submit script by running the command

  make submit

from within the project3 directory.

Grading Criteria