POST Protocol Trace

The following is what is submitted to the web server when submitting a form. The form is the Request Letter form. It has tree graphical widgets, corresponding to three name-value pairs: title, firstname and lastname. They are transmitted by an encoding, probably the same as in a GET query, that is RFC 2396, just after the HTTP headers, seperated by a new line.

The response to the POST is the result of the script run on the post data. In this case it is the personalized invitation letter. To emphasis, it is sent as the response to the post. The script's work is generally finished by the time the result page is displayed. Other disciplines are more difficult to arrange and are discouraged by the nature of the medium.

The flow from client to server is red, from server to client, blue. We have kept it together to emphasize the query/response atomicity of the protocol.

POST /~burt/learning/Csc598.073/workbook/personal_letter.php HTTP/1.1 Host: www.cs.miami.edu User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11 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 Referer: http://www.cs.miami.edu/~burt/learning/Csc598.073/workbook/request_letter.html Content-Type: application/x-www-form-urlencoded Content-Length: 45 title=Mr.&firstname=BURTON&lastname=ROSENBERG
HTTP/1.1 200 OK Date: Wed, 23 May 2007 18:42:17 GMT Server: Apache/1.3.29 (Unix) PHP/4.3.10 X-Powered-By: PHP/4.3.10 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html 27c <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Personal Letter</title> <!-- <script type="text/javascript" src="myjavascript.js"></script> --> <link href="personal_letter.css" rel="stylesheet" type="text/css"> <style type="text/css"><!-- /* internal styles */ --></style> </head> <body> <h1>Your Personal Letter</h1> <p> Dear Mr. BURTON ROSENBERG:</p> <p> This special offer is just for you, Mr. BURTON ROSENBERG. So act now. </p> <p> Sincerely, <br> The Management </p> </body> </html>