hoffm386/cse491-serverz — pull request #6 by hoffm386 (2014-02-06 09:33:02+00:00)
Title: Homework 4 Changes

Added libraries that I don't really understand: cgi, StringIO, jinja2. I think they allow
for some new types of multipart/form-data, but I'm not really sure what those are either!

server.py now loops until it has received all of the data from the connection (not just
grabbing 1000 bytes like before). This relies on the "Content-Length" variable, which I'm
hoping we can assume will always be accurate, since an inaccurate one can land the server
in an infinite loop.

server.py also uses jinja2 to open html files and fill in variables, which is much nicer
than doing it manually. Matching up the html strings in test_server.py is still a massive
pain, but I guess we have to do it that way?

One of the new files opened with jinja2 is 404.html, which displays a proper error message
when an invalid URL is entered.

test_server.py is updated to handle the new, properly-formed html files, and no longer
attempts to do a POST without any args -- that was complicated and not required by the
assignment description, so I'm leaving it out for now. Code coverage seems adequate.

As usual, ChangeLog was updated with a much shorter version of the documentation here.