1
1
Aaron Stevens
6 April 2009
CS101 Lecture 28: Dynamic Web Pages
2
CS101 Lecture 28: Dynamic Web Pages Aaron Stevens 6 April 2009 1 - - PDF document
CS101 Lecture 28: Dynamic Web Pages Aaron Stevens 6 April 2009 1 Overview/Questions Review: how the WWW works What does HTTP actually do? How do web pages change to provide dynamic content? A python web page example 2 1
1
2
3
4
5
6
7
8
The HTTP request message is like the following:
GET / HTTP/1.1 Host: www.bu.edu:80 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en- US; rv:1.8.1.5) Gecko/20070713 Firefox/2.0.0.5 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q =0.9,text/plain;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 Keep-Alive: 300 Connection: keep-alive
9
10
HTTP/1.1 200 OK Date: Wed, 01 Aug 2007 17:33:41 GMT Server: Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.7l Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html 77b <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" ...
11
HTTP/1.1 200 OK Date: Wed, 01 Aug 2007 17:33:41 GMT Server: Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.7l Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html ...
12
13
14
15
16
17
18
http://azs.bu.edu/cs101/current/<USERNAME>/<PROGRAM>
19
20
21
22
23
24
25
26
27
28
29