Assignment 3
Due Date: 2019-10-27
Available Points: 20
This assignment builds on top of previous assignments and primarily focuses on encoding, content negotiation, and partial content.Additional Methods
- No new methods
Additional Status Codes
206Partial Content300Multiple Choice (Use if there are more than one possible representations and 1) User-agent sendsNegotiate: 1.0or 2)qvalues result in a tie)406Not Acceptable (Use if there are no possible representations that match the requestedqvalues)416Requested Range Not Satisfiable
Additional Request Headers
AcceptAccept-CharsetAccept-EncodingAccept-LanguageNegotiateRange(We will defer multiple Range specifications that would result in amultipart/byterangesresponse (RFC 7233; sections 4.1, 4.3))If-RangeUser-AgentReferer
Additional Response Headers
VaryContent-LanguageContent-LocationContent-EncodingTransfer-Encoding: chunked(Revisit Section 7.1, RFC 7230 for the correct syntax)AlternatesTCNAccept-RangeContent-RangeContent-type(Add charset after type if notISO-8859-1(ASCII))
Encodings
- Supports
gzipandcompress - Use
chunkedtransfer encoding for any dynamically generated server response- For example, directory listings and
3xx,4xx,5xxhtml snippets - Use 2 lines as the “chunk”
- For example, directory listings and
Notes
- Support/advertise partial
GETcapability (i.e.,Accept-Range) for all resources/responses for which you do not useTransfer-Encoding: chunked - Use these language encodings (in a config file):
en,es,de,ja,ko,ru
- Use these non-
ASCIIcharset encodings (in a config file):jis->iso-2022-jpkoi8-r->koi8-reuc-kr->euc-kr
- Build
Varyresponse header as:Vary: negotiate, header1, header2, ..., headerN- Only send
Varyif content negotiation is possible for this URI
- Generate structured
ETagson selected representation as per RFC 2295 (section 9.2)
Submission and Evaluation
- Extract sample test files tarball into your web server’s document root
- Place your
Dockerfileat the root of your repository (not inside of a nested folder) - Make your
Dockerfilerun your server on port80by default - Release your implementation with the
a3tag - Submissions will be evaluated using a variation of
cs531a3test suite from our testing service and some manual inspection of responses and source code (if necessary) - Tests will be performed based on the contents and structure of the
a3-testfolder of the sample test files - One point will be awarded for passing test cases of each of the previous assignments (except certain test cases where there are obvious backward compatibility conflicts)