CNT4713 Extra Credit 4 - Web Server
Due Sunday 10/16
Worth 1 point
Write a web server that implements a conditional GET
, using the
If-modified-since
header.
- The web server only has to be able to
return one file, but it must be an actual file.
- If the browser already has the
file, only send the appropriate HTTP response to indicate that the browser
already has the file.
- You may use the WebServer.py example from class, but modify it so it only
returns one file.
- The script should work when called from an existing browser.
The web server is a stand-alone server, not a cgi script. Place it in the cgi-bin
so I know where it is, but you will not be able to run it from the web. To test your
server, start it from the command line, then call it from a browser.
Request a port
for your web server, so we can minimize the chance of students using the same port.
You will access your server with a URL like http://ocelot.aul.fiu.edu:9999/some-file,
replacing 9999 with the port number you request and some-file with the name of the file
the server has.
Modify index.html
I want to be able to run your scripts on ocelot, without having to type the
name of each script in the URL.
- Modify the
index.html
from extra credit 1 and add a link to this script.
- Use my index page as a reference:
Index Page.
You may copy the source of my page and modify it with your name and the names of your scripts.
- Add a link from the index page to the server requesting the file it delivers.
- Add a link from the index page to the server requesting a file it does not have.
Submitting the Assignment
To hand in
the assignment, place all your scripts in the cgi-bin folder on ocelot.
Zip the public_html folder, including the cgi-bin folder.
DO NOT USE 7-ZIP or RAR!!!
- Please use the following command to your public_html
folder.
zip -r ~/username ~/public_html -x \*.zip
Replacing username with your user name. This will create a file
named username.zip.
- Check the size of the ZIP file, it should be less than 3 MB. If it is
not, then you probably have another ZIP file stored in the ZIP archive.
Delete it and re-zip.
- You then have a choice for submitting the file.
- If you are logged onto ocelot, use my uploading program to upload the
file. Enter this command at the command prompt:
~downeyt/cs/public/webftp/webftp.pl
- If you are using winscp, then download the zip file to your computer;
then, upload the file to me:
Submitting
homework on-line via the Web.
- Upload the file as binary.