Professional Documents
Culture Documents
Fundamentals of Web Programming: Lecture 7: HTTP & CGI
Fundamentals of Web Programming: Lecture 7: HTTP & CGI
Web Programming
Lecture 7: HTTP & CGI
Content/type: text/html
<html><body>
<h1>Hello!</h1>...
Browser
6. Render Response
Web Server
Lecture 7: HTTP and CGI 7
HTTP Is Stateless
• A stateless protocol doesn’t
remember anything from one
transaction to another (all
transactions are independent)
• Workarounds:
– Use INPUT with TYPE=HIDDEN to
store state information
– use cookies to store state information
CGI Program
4. Send Header
5. Send Content
6. Exit
Browser
Content-type: text/html