Protocols in multi-service networks
Protocols in multi-service networks

This free course is available to start right now. Review the full course description and key learning outcomes and create an account and enrol if you want a free statement of participation.

Free course

Protocols in multi-service networks

3.3 Hypertext transfer protocol (HTTP)

In this section, I shall look at one example of an application of the TCP/IP protocol suite – sending hypertext pages over the world wide web (WWW or simply the web). However, first I shall very briefly summarise the main features of the web that are relevant to this discussion. There are many sources of information about the web on the web itself for those who want to know more.

In very basic terms, the web is an application of the Internet for accessing resources wherever they are located. Each resource on the web is found through a name called a uniform resource locator (URL). A URL consists first of the name of the scheme for communicating with the resource at the application layer (e.g. FTP, HTTP, MAILTO) followed by a scheme-specific part. The only scheme we shall look at here is HTTP, and the syntax for HTTP URLs takes the form of:

http:// <host> : <port> / <path> ? <search-part>

where the names in angled brackets indicate that values are inserted in actual URLs. The ‘host’ is the domain name as given in the domain name system of the Internet. The ‘port’ is optional and is described in the next section, but it can be thought of as a way of identifying the different applications that may be running in an application layer. The ‘path’ in a URL identifies the name of the resource in the host's filing system. The ‘search-part’ is optional and is used when the resource is a search engine. If no ‘port’ value is given, then a default value is used.

SAQ 6

Identify the component parts of the following URL:

  • http://www.altavista.digital.com/cgi-bin/query?q=mullti-service+network

Answer

The name of the host is ‘www.altavista.digital.com’, the name of the path is ‘cgi-bin/query’ and the search-part is ‘q=multi-service+network’. No port value is specified, so a default value is used.

When the resource on the web is a hypertext page with links to other pages, retrieving one page of information may trigger several subsequent requests to obtain resources.

In many situations, users access the web through a proxy server, which separates an internal network from the Internet and thereby can offer some degree of protection to the users. A proxy server can also provide temporary local storage (a cache store) of resources obtained from the web. Storing a resource locally can avoid repeating a recent request for the same resource.

Figure 15 shows the application layer view of the communication between peer entities. In this simple example the only function of the proxy server that we are interested in is that of repeating the messages it receives.

Figure 15
Figure 15 HTTP protocol model

HTTP (hypertext transfer protocol) takes the form of commands from a client, typically a browser computer program, and responses from a server. A command (called a method in HTTP terminology) can occupy several lines. The first line has the name of the command, the identity of the resource, and the scheme version number. Subsequent lines may contain parameters, which modify the command, and any data to be transferred to the server. Examples of parameters are the name of the host and a date giving the last time a resource was modified. A response from a server takes the form of a status line, additional information about the type of response, and the resource itself.

Commands and responses are defined in RFC 2616. Some example commands are listed in Table 3 and example responses in Table 4.

Table 3: Example HTTP commands

Command Description
Connect Establishes a tunnel1 through a proxy server
Delete Requests the removal of a resource
Get Requests the retrieval of a resource
Head Requests the retrieval of information about a resource rather than the resource itself
Options Requests information about the capabilities of a server or the requirements of a resource
Post Requests that a resource accepts some information
Put Requests that a resource is stored at the given location
Trace Requests that a server takes part in some test

1A tunnel is created by encapsulation. A received message is encapsulated in another message so that the received message is transferred transparently through a node or network.

Table 4: Example HTTP responses

Response Description
100 Continue
200 OK
202 Accepted
302 Found
400 Bad request
404 Not found
406 Not acceptable

Figure 16 shows an example of commands and responses between an HTTP client and server via a proxy server.

Figure 16
Figure 16 Example HTTP communication

HTTP protocol data units are transferred by requesting a connection-oriented service from the transport layer, for example by calling on the TCP protocol to transfer messages between the client and server. In the first version of HTTP, individual connections were set up for each resource and this could entail establishing several consecutive connections for hypertext pages that included links to other resources. The current version of HTTP has improved efficiency by allowing a host to maintain a connection for more than one transfer if appropriate. Efficiency is further improved by allowing a host to submit several requests without waiting for an acknowledgement.

T822_1

Take your learning further

Making the decision to study can be a big step, which is why you'll want a trusted University. The Open University has nearly 50 years’ experience delivering flexible learning and 170,000 students are studying with us right now. Take a look at all Open University courses.

If you are new to university level study, find out more about the types of qualifications we offer, including our entry level Access courses and Certificates.

Not ready for University study then browse over 900 free courses on OpenLearn and sign up to our newsletter to hear about new free courses as they are released.

Every year, thousands of students decide to study with The Open University. With over 120 qualifications, we’ve got the right course for you.

Request an Open University prospectus