Your task is to build a partially HTTP 1.1 compliant webserver. Your webserver will serve static content from the www directory in the same directory that you start the webserver in.
You are meant to understand the very basics of HTTP by having a hands-on ground up understanding of what it takes to have an HTTP connection.
- You may consult with others but the submission should be your own source code.
- Collaboration must be documented in the README.md file
- Any external source code must be referenced and documented in the README.md file
- As a user I want to view files in ./www via a webbrowser
- As a user I want to view files in ./www via curl
- As a webserver admin I want to serve HTML and CSS files from ./www
- As a webserver admin I want ONLY files in ./www and deeper to be served.
- [ ] The webserver can serve files from ./www
- [ ] The webserver can be run using the runner.sh file
- [ ] The webserver can pass all the tests in freetests.py
- [ ] The webserver can pass all the tests in not-free-tests.py (you only have part of this one, I reserve the right to add tests)
- [ ] The webserver supports mime-types for HTML
- [ ] The webserver supports mime-types for CSS
- [ ] The webserver can return index.html from directories (paths that end in /)
- [ ] The webserver can server 404 errors for paths not found
- [ ] The webserver works with Firefox and Chromium http://127.0.0.1:8080/
- [ ] The webserver can serve CSS properly so that the front page has an orange h1 header.
- [ ] I can check out the source code via an HTTP git URL
- [ ] Provide 1 screenshot (commit and push it!) of Firefox at http://127.0.0.1:8080/ as ./root.png in the root of the repo
- [ ] Provide 1 screenshot (commit and push it!) of Firefox at http://127.0.0.1:8080/deep/ as ./deep.png in the root of the repo
- [ ] Return a status code of “405 Method Not Allowed” for any method you cannot handle (POST/PUT/DELETE)
- [ ] Must use 301 to correct paths such as http://127.0.0.1:8080/deep to http://127.0.0.1:8080/deep/ (path ending)
- [ ] Tests must execute within 180 seconds.
- [ ] Use Python3
- [ ] Must run on Ubuntu (Use the undergrad lab machines, for example the ones in CSC 2-29 or install an Ubuntu VM to check this)
- [ ] License your webserver properly (use an OSI approved license)
- Put your name or some identifier (not your student number) on it!
- [ ] You cannot use a Web Server library
- [ ] Screenshots must be named deep.png and root.png in the root of the repository
- Use the server.py skeleton. Handling sockets yourself is not that fun
- Keep it short, keep it modular
- Fork my repository from github https://github.com/abramhindle/CMPUT404-assignment-webserver
- Push your commits to your fork
- In EClass for this assignment submit a URL to the git
repository. I would prefer github for the host.
- Line 1: the git URL
- Line 2: Your CCID
- Line 3: Your collaborator’s CCID
- An example submission looks like this (must be a https link)
https://github.com/youruserid/thisassignment.git yourccid yourbuddy1, yourbuddy2
- collaborators must follow the collaboration policy guideline for this assignment.
- To mark your assignment I should be able to type:
git clone http://github.com/youruserid/thisassignment.git yourccid cd yourccid bash runner.sh
- Marks will be deducted if I cannot successfully do this.
- Excellent 7/7: All tests pass (free and notfree), Firefox screenshots included in proper locations. Test runner execut
- Good 6/7: All tests pass (free and notfree), Firefox screenshots not in proper location
- Satisfactory 5/7: All tests pass (free and notfree), No firefox screenshots
- Unsatisfactory 4/7: All tests pass except extra notfree tests that are not included in this repo. OR an excellent assignment that didn’t follow the requirements in any way.
- Failure 0/7: Any free or notfree tests fail