Assignment 3
Due Date: 2022-11-02
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
206
Partial Content300
Multiple Choice (Use if there are more than one possible representations and 1) User-agent sendsNegotiate: 1.0
or 2)q
values result in a tie)406
Not Acceptable (Use if there are no possible representations that match the requestedq
values)416
Requested Range Not Satisfiable
Additional Request Headers
Accept
Accept-Charset
Accept-Encoding
Accept-Language
Negotiate
Range
(We will defer multiple Range specifications that would result in amultipart/byteranges
response (RFC 7233; sections 4.1, 4.3))If-Range
User-Agent
Referer
Additional Response Headers
Vary
Content-Language
Content-Location
Content-Encoding
Transfer-Encoding: chunked
(Revisit Section 7.1, RFC 7230 for the correct syntax)Alternates
TCN
Accept-Range
Content-Range
Content-type
(Add charset after type if notISO-8859-1
(ASCII
))
Encodings
- Supports
gzip
andcompress
- Use
chunked
transfer encoding for any dynamically generated server response- For example, directory listings and
3xx
,4xx
,5xx
html snippets - Use 2 lines as the “chunk”
- For example, directory listings and
Notes
- Support/advertise partial
GET
capability (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-
ASCII
charset encodings (in a config file):jis
->iso-2022-jp
koi8-r
->koi8-r
euc-kr
->euc-kr
- Build
Vary
response header as:Vary: negotiate, header1, header2, ..., headerN
- Only send
Vary
if content negotiation is possible for this URI
- Generate structured
ETags
on 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
Dockerfile
at the root of your repository (not inside of a nested folder) - Make your
Dockerfile
run your server on port80
by default - Release your implementation with the
a3
tag - Submissions will be evaluated using a variation of
cs531a3
test 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-test
folder 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)