Old Dominion University Department of Computer Science

Slides:



Advertisements
Similar presentations
HTTP HyperText Transfer Protocol Part 3.
Advertisements

Web Server Design Week 8 Old Dominion University Department of Computer Science CS 495/595 Spring 2010 Martin Klein 3/3/10.
Web Server Design Week 4 Old Dominion University Department of Computer Science CS 495/595 Spring 2010 Martin Klein 2/03/10.
Web Server Design Assignment #1: Basic Operations Due: 02/03/2010 Old Dominion University Department of Computer Science CS 495/595 Spring 2010 Martin.
Web Server Design Assignment #2: Conditionals & Persistence Due: 02/24/2010 Old Dominion University Department of Computer Science CS 495/595 Spring 2010.
2007cs Servers on the Web. The World-Wide Web 2007 cs CSS JS HTML Server Browser JS CSS HTML Transfer of resources using HTTP.
Web Server Design Week 7 Old Dominion University Department of Computer Science CS 495/595 Spring 2010 Martin Klein 2/24/10.
Web Server Design Week 13 Old Dominion University Department of Computer Science CS 495/595 Spring 2010 Martin Klein 4/7/10.
Web Server Design Assignment #4: Authentication Due: 04/14/2010 Old Dominion University Department of Computer Science CS 495/595 Spring 2010 Martin Klein.
Web Server Design Week 6 Old Dominion University Department of Computer Science CS 495/595 Spring 2010 Martin Klein 2/17/10.
Web Server Design Assignment #3: Transfer Encoding & Content Negotiation Due: 03/24/2010 Old Dominion University Department of Computer Science CS 495/595.
Web Server Design Assignment #5: Unsafe Methods & CGI Due: 05/05/2010 Old Dominion University Department of Computer Science CS 495/595 Spring 2010 Martin.
Web Programming Week 1 Old Dominion University Department of Computer Science CS 418/518 Fall 2007 Michael L. Nelson 8/27/07.
Web Server Design Week 1 Old Dominion University Department of Computer Science CS 495/595 Spring 2006 Michael L. Nelson 1/09/06.
Web Server Design Week 3 Old Dominion University Department of Computer Science CS 495/595 Spring 2006 Michael L. Nelson 1/23/06.
Web Server Design Week 6 Old Dominion University Department of Computer Science CS 495/595 Spring 2006 Michael L. Nelson 2/13/06.
What’s Really Happening
CS320 Web and Internet Programming Generating HTTP Responses
HTTP – An overview.
The Hypertext Transfer Protocol
HTTP Headers.
Web Server Design Week 10 Old Dominion University
Web Server Design Assignment #5: Unsafe Methods & CGI
Hypertext Transfer Protocol
Web Server Design Assignment #4: Authentication
Web Server Design Assignment #2: Conditionals & Persistence
Web Server Design Week 8 Old Dominion University
Web Server Design Week 11 Old Dominion University
Web Server Design Week 7 Old Dominion University
HTTP Protocol.
Web Programming Assignment #1: Basic BBS Operations
Web Server Design Assignment #5 Extra Credit
Web Server Design Week 4 Old Dominion University
HTTP Request Method URL Protocol Version GET /index.html HTTP/1.1
Web Server Design Week 15 Old Dominion University
Web Server Design Week 5 Old Dominion University
Hypertext Transfer Protocol
Web Server Design Assignment #2: Conditionals & Persistence
Web Programming Assignment #4: Searching, Notification & Upload
Web Server Design Week 8 Old Dominion University
Web Server Design Week 8 Old Dominion University
Web Server Design Assignment #2: Conditionals & Persistence
Old Dominion University Department of Computer Science
Web Server Design Week 6 Old Dominion University
Web Programming Assignment #2: Expanded BBS Features
Web Server Design Week 13 Old Dominion University
Web Programming Assignment #2: Expanded BBS Features
Web Server Design Week 8 Old Dominion University
Web Server Design Week 11 Old Dominion University
Web Server Design Week 5 Old Dominion University
Web Server Design Week 11 Old Dominion University
Web Programming Assignment #3: Admin and User Functions
Web Server Design Week 3 Old Dominion University
Web Server Design Week 4 Old Dominion University
Web Programming Assignment #4: Searching & Notification
HTTP Hypertext Transfer Protocol
Web Server Design Week 12 Old Dominion University
Web Server Design Week 12 Old Dominion University
Web Server Design Week 14 Old Dominion University
Web Server Design Assignment #1: Basic Operations
Web Programming Assignment #1: Basic BBS Operations
Web Server Design Week 6 Old Dominion University
Peer-to-Peer Information Systems Week 6: Assignment #3
CSCI-351 Data communication and Networks
Web Server Design Assignment #5 Extra Credit
Web Programming Assignment #1: Basic BBS Operations
Web Server Design Week 7 Old Dominion University
Web Programming Week 1 Old Dominion University
Web Server Design Week 7 Old Dominion University
Web Programming Assignment #3: Admin and User Functions
Presentation transcript:

Web Server Design Assignment #3: Transfer Encoding & Content Negotiation Old Dominion University Department of Computer Science CS 495/595 Spring 2012 Michael L. Nelson <mln@cs.odu.edu>

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 person will give a 3-4 minute status report the week before an assignment is due! If you have a question: email the class list mimic the behavior of a well known Apache server (e.g., www.cs.odu.edu)

Methods to Support Same as assignments 1 & 2

Status Codes to Support Same as assignments 1 & 2, plus: 206 Partial Content 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 that match the requested q values 416 Requested Range Not Satisfiable

Note: I'll be testing 403 Via sudo, I'm going to remove the read permissions on one of your files on mln-web.cs.odu.edu

Request Headers Same as assignments 1 & 2 Add: (note: we won't do TE:) Accept Accept-Charset Accept-Encoding Accept-Language Negotiate Range User-Agent Referer (note: we won't do TE:)

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

MIME Types Same as assignment #1

Encoding Types compress, gzip, deflate, identity, chunked (see week 8 lecture) Use “chunked” transfer encoding for any dynamically generated server response i.e., directory listings and 3xx, 4xx, 5xx html snippets use 2 lines as the “chunk”

Further Guidance Support/advertise partial GET capability for all resources for all resources/responses for which you don't use Transfer-Encoding: chunked i.e.: representation == files on the file system 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”

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 structured ETags on selected representation as per RFC-2295 (section 9.2)

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 OR the client sends a “Negotiate: 1.0” request header 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

Redirections Delete the previous 302 redirections Add the 301 redirections on the next page:

301 Redirection # # Incoming RE 301 URI ^(.*)/dj-shadow/(.*) http://djshadow.com/ ^/wsdl/$ http://ws-dl.blogspot.com/ ^(.*)/3/(.*) $1/4/directory3isempty

Combined Log Format Basically, add Referer: and User-Agent: fields: "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" http://httpd.apache.org/docs/current/mod/mod_log_config.html