W3C home > Mailing lists > Public > public-bpwg-ct@w3.org > July 2008

ACTION-816: Write some text for CT Appendix B.2

From: Sean Patterson <SPatterson@Novarra.com>
Date: Wed, 23 Jul 2008 16:22:47 -0500
Message-ID: <24889886D84B794A9259323D7354CF3306AFBF57@novarrainet2.internalnt.novarra.com>
To: "public-bpwg-ct" <public-bpwg-ct@w3.org>
Example for section B.2 of CT Guidelines:


The CT Proxy receives a request for a website that it hasn't interacted
with before:

GET / HTTP/1.1
Host: www.reallycoolnonmobilesite.com
User-Agent: MobilePhoneManufacturerInc 1000 (1.0)
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plai
n;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7


The CT Proxy forwards this request to the website:

GET / HTTP/1.1
Host: www.reallycoolnonmobilesite.com
User-Agent: MobilePhoneManufacturerInc 1000 (1.0)
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plai
n;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Via: 1.1 ronco-ct.com (Ronco CT-o-matic/7.3)
X-Forwarded-For: 10.1.1.200


The CT proxy receives the response from the origin server for the
website:

HTTP/1.1 200 OK
Date: Wed, 23 Jul 2008 19:36:25 GMT
Server: Apache
Content-Type: text/html
Content-Length: 156

<html>
<head>
<title>Unsupported browser</title>
</head>
<body>
Unsupported browser.  Please get a different one or use a CT proxy.
</body>
</head>


The CT proxy determines that this 200 response equates to a 406 and
re-requests the web page from the origin server with altered headers:

GET / HTTP/1.1
Host: www.reallycoolnonmobilesite.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.16)
Gecko/20080702 Firefox/2.0.0.16 Ronco CT-o-matic/7.3
Accept: text/html;q=1.0, text/css; q=1.0, application/x-javascript;
q=1.0, text/plain;q=0.8, application/xhtml+xml;q=0.6,
application/x-httpd-php;q=0.1, */*;q=0, image/gif; q=1.0, image/jpeg;
q=1.0, image/png; q=1.0
Accept-Language: en-us,en;q=0.5
Accept-Encoding: identity;q=1.0, gzip;q=0.1, *;q=0
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Via: 1.1 ronco-ct.com (Ronco CT-o-matic/7.3)
X-Forwarded-For: 10.1.1.200
X-Device-User-Agent: MobilePhoneManufacturerInc 1000 (1.0)
X-Device-Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plai
n;q=0.8,image/png,*/*;q=0.5
X-Device-Accept-Encoding: gzip,deflate


The origin server returns the desktop version of the web page:

HTTP/1.1 200 OK
Date: Wed, 23 Jul 2008 19:36:27 GMT
Server: Apache
Content-Type: text/html
Content-Length: 29478

...29478 bytes of really cool HTML...


The CT proxy transforms this web page into content displays well on the
phone:

HTTP/1.1 200 OK
Date: Wed, 23 Jul 2008 19:36:28 GMT
Server: Ronco CT-o-matic/7.3
Content-Type: text/html
Content-Length: 14573
Warning: 214 Transformation Applied

...14573 bytes of really cool transformed HTML...




A few hours later, the CT proxy receives a request from a different user
agent for the same web page:

GET / HTTP/1.1
Host: www.reallycoolnonmobilesite.com
User-Agent: PhonesRUsInc XL 500 (3.0)
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plai
n;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7


The CT proxy remembers that this website doesn't handle mobile user
agents properly and since the origin server has not indicated that it
varies on the User-Agent header (no Vary header), the CT proxy sends a
request with altered headers immediately:

GET / HTTP/1.1
Host: www.reallycoolnonmobilesite.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.16)
Gecko/20080702 Firefox/2.0.0.16 Ronco CT-o-matic/7.3
Accept: text/html;q=1.0, text/css; q=1.0, application/x-javascript;
q=1.0, text/plain;q=0.8, application/xhtml+xml;q=0.6,
application/x-httpd-php;q=0.1, */*;q=0, image/gif; q=1.0, image/jpeg;
q=1.0, image/png; q=1.0
Accept-Language: en-us,en;q=0.5
Accept-Encoding: identity;q=1.0, gzip;q=0.1, *;q=0
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Via: 1.1 ronco-ct.com (Ronco CT-o-matic/7.3)
X-Forwarded-For: 10.1.1.200
X-Device-User-Agent: PhonesRUsInc XL 500 (3.0)
X-Device-Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plai
n;q=0.8,image/png,*/*;q=0.5
X-Device-Accept-Encoding: gzip,deflate
X-Device-Accept-Language: en-us


The origin server again returns the desktop version of the web page:

HTTP/1.1 200 OK
Date: Wed, 23 Jul 2008 22:45:06 GMT
Server: Apache
Content-Type: text/html
Content-Length: 29478

...29478 bytes of really cool HTML...


The CT proxy again transforms this web page into content displays well
on the phone (the transformation will be different for this phone since
the user agent is different):

HTTP/1.1 200 OK
Date: Wed, 23 Jul 2008 22:45:07 GMT
Server: Ronco CT-o-matic/7.3
Content-Type: text/html
Content-Length: 16412
Warning: 214 Transformation Applied

...16412 bytes of really cool transformed HTML...




Sean
Received on Wednesday, 23 July 2008 21:23:30 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:06:29 UTC