HTTP Example

The "HTTP Transaction" shows a script of an HTTP transaction using telnet. It shows both an HTTP request and an HTTP response.

When this script was made the request was typed in. More recent web servers are configured to close the connection if the request is too slow. The best way to do this today is to first write the request in an editor and copy it to the clipboard. Then make the telnet connection and quickly paste in the request.

HTTP Transaction

This is a script of a HTTP transaction in telnet session run on a UNIX machine. The command to start the session is shown with a pink background. The response of the telnet server is shown in yellow.

The HTTP request is shown with a light green background. It is just a header with no message body.

The HTTP response has both a header and a message body. The response header is shown with a light blue background. The response message body is shown with a light gray background.

 gshute@susan:~$ telnet www.d.umn.edu 80
 Trying 131.212.109.109...
 Connected to www.d.umn.edu.
 Escape character is '^]'.
 GET /~gshute/net/nettest.html HTTP/1.1
 Host: www.d.umn.edu
 Connection: close
 
 HTTP/1.1 200 OK
 Date: Fri, 30 Jan 2015 12:54:08 GMT
 Server: Apache/2.2.16 (Debian)
 Accept-Ranges: bytes
 Vary: Accept-Encoding
 Content-Length: 111
 Connection: close
 Content-Type: text/html
 
 <html>
 
   <head>
     <title>Test Page</title>
   </head>
 
   <body>
 
     <h2>Test Page</h2>
 
   </body>
 
 </html>
 
 Connection closed by foreign host.