Information Technology Reference
In-Depth Information
Fig. 2.2 An HTTP response
from a server
HTTP/1.1 200 OK
Date: Wed, 16 Apr 2008 14:12:09 GMT
Server: Apache/2.2.4 (Fedora)
Accept-Ranges: bytes
Connection: close
Content-Type: text/html; charset=ISO-8859-1
Content-Language: fr
Content-type and Content-language . These are both considered different
languages, as a single web-page can be composed in multiple languages, such as the
text being given in English with various formatting given in HTML. Every HTTP
entity body should have its particular encoding specified by the Content-type .
The formal languages that can be explicitly given in a response or request in HTTP
are called content types . In the example response, based on the header that the
content type is text/html a user-agent can interpret ('display as a web-page')
the encoding of the HTTP entity body as HTML. Since the same encoding can
theoretically represent many different languages besides HTML, a user-agent can
only know definitely how to process a message through the content type. If no
content type is provided, the agent can guess the content type through various
heuristics including looking at the bytes themselves, a process informally called
sniffing . A user-agent can specify what media types they (can) prefer, so that a web-
server that can only present JPEG images can specify this by also asking for the
content type image/jpeg in the request.
Content-types in HTTP were later generalized as 'Internet Media Types' so they
could be applied with any Internet protocol, not just HTTP and MIME ( Multimedia
Internet Message Extensions , an e-mail protocol) (Postel 1994). A media type
consists of a two-part scheme that separates the type and a subtype of an encoding ,
with a slash indicating the distinction. Internet media types are centrally registered
with IANA, 6 although certain 'experimental' media types (those beginning with 'x-
') can be created in a decentralized manner (Postel 1994). A central registry of media
types guarantees the interoperability of the Web, although increasingly new media-
types are dependent on extensions to specific applications (plug-ins) in order to run.
Support for everything from new markup languages to programming languages such
as Javascript can be declared via support of its media type.
To move from concrete bits to abstract definitions, a protocol can be defined
and implemented in many different types of way. In the early ARPANet, the first
wide-area network and foundation of the Internet, the protocol was 'hard-wired'
in the hardware of the Interface Message Processor (IMP), a separate machine
attached to computers in order to interface them with ARPANet (Hafner and Lyons
1996). As more and more networks multiplied, these heterogeneous networks began
using different protocols. While the invention of TCP/IP let these heterogeneous
networks communicate, TCP/IP does not interpret messages beyond bits. Further
6 At http://www.iana.org/assignments/media-types/ .
Search WWH ::




Custom Search