Presentation is loading. Please wait.

Presentation is loading. Please wait.

Old Dominion University Department of Computer Science

Similar presentations


Presentation on theme: "Old Dominion University Department of Computer Science"— Presentation transcript:

1 Web Server Design Assignment #3: Transfer Encoding & Content Negotiation
Old Dominion University Department of Computer Science CS 495/595 Spring 2006 Michael L. Nelson

2 Grading To be done by an automated program that will test most (all?) combinations assignment is listed under the day it is to be demoed in class each group will give a 3-4 minute status report the week before an assignment is due! If you have a question: the class list mimic the behavior of a well known Apache server (e.g.,

3 Methods to Support Same as assignments 1 & 2

4 Status Codes to Support
Same as assignments 1 & 2, plus: 300 Multiple Choice use if there are > 1 possible representations provide html list for a user to pick from 406 Not Acceptable use if there are no possible representations

5 Request Headers Same as assignments 1 & 2 and add: Accept
Accept-Charset Accept-Encoding Accept-Language User-Agent Referer

6 Response Headers Same as assignments 1 & 2, but add: Modified Vary
Content-Language Content-Location “Transfer-Encoding: chunked” Modified Content-type add charset after type if not ISO (ASCII) see week 10 slides for example

7 MIME Types Same as assignment #1

8 Encoding Types compress, gzip, deflate, identity, chunked
(see week 8 lecture)

9 Further Guidance Use “chunked” transfer encoding for any non-200 response code use 2 lines as the “chunk” Use these language encodings en, es, de, ja, ko, ru Use these non-ASCII charset encodings “.jis” -> “iso-2022-jp” “koi8-r” -> “koi8-r” “euc-kr” -> “euc-kr”

10 Further Guidance Build “Vary” response header as:
Vary: negotiate, header1, header2, …, headerN use the “Vary” header only if content negotiation has been performed No “default” q values in content negotiation remember: content negotiation only happens if the request would have generated a 404 without content negotiation Generate ETags on selected representation we will not do structured ETags as described in RFC-2295

11 Status Code Definition
Generate a 200: if there is only a single representation as a result of Accept headers and q values Generate a 300: if there are multiple representations that “tie” in q values generate an HTML list showing possible options Generate a 406: if no representations are suitable given Accept headers and q values generate an HTML list showing closest options


Download ppt "Old Dominion University Department of Computer Science"

Similar presentations


Ads by Google