4.2 Translate Request Header

The following examples show the difference between requesting an entity and the source of an entity. The first example is a typical HTTP GET command as issued by a browser such as Internet Explorer.

Request:

 GET /Temp/world.asp HTTP/1.1
 Translate: t
 Host: localhost
 Accept: */*

Response:

  
 HTTP/1.1 200 OK
 Server: Microsoft-IIS/5.1
 Date: Wed, 28 Jun 2006 00:06:21 GMT
 Content-Length: 129
 Content-Type: text/html
 Set-Cookie: ASPSESSIONIDCSSTSCQB=IEEJDPNAAIJECIOOBLMMGDJM; path=/
 Cache-control: private
  
 <FONT SIZE="1">Hello World</FONT><BR>
  
 <FONT SIZE="2">Hello World</FONT><BR>
  
 <FONT SIZE="3">Hello World</FONT><BR>
  

An authoring application might want to retrieve the source of an entity, and it would issue the same request asking for the source of the entity as follows:

Request:

  
 GET /Temp/world.asp HTTP/1.1
 Translate: f
 Host: localhost
 Accept: */*

Response:

  
 HTTP/1.1 200 OK
 Server: Microsoft-IIS/5.1
 Date: Wed, 28 Jun 2006 00:16:34 GMT
 Content-Type: text/plain
 Content-Length: 497
 ETag: "22a87614489ac61:c02"
 Last-Modified: Wed, 28 Jun 2006 00:16:19 GMT
 Accept-Ranges: bytes
 <%
 '***********************************************
 '*     Sample ASP Code                         *
 '*                                             *
 '***********************************************
  
 ' Declare  loop variable.
 Dim I
  
 ' Loop 3 times, adjusting the
 ' font size in each loop.
 For I = 1 To 3 Step 1
   ' Output our HTML and text using the value
   ' of I as the FONT TAG's SIZE attribute.
 %>
 <FONT SIZE="<%=I%>">Hello World</FONT><BR>
 <%
 Next ' continue looping
 %>

The difference between these two requests is that the second one is requesting the source of an entity. This is a typical example of how the Translate request header is used.