![]() Understanding Application Layer Protocols | Hyper. Text Transfer Protocol (HTTP)This chapter is from the book In this chapter, we'll move further up the OSI Seven Layer Model and take an in- depth look at the workings of some of the. Application layer protocols that are most commonly used in content switching. You probably use some form of encryption almost every day, and you probably don't even think about it. But what is it and how does it work? ![]() These include TCP- based services such as HTTP, UDP services like DNS, and applications that use a combination of TCP and UDP, such as the Real Time Streaming Protocol (RTSP). Finally, we'll look at how these types of applications can be secured using Secure Sockets Layer (SSL). The Hyper. Text Transfer Protocol, or HTTP, must be the most widely used Application layer protocol in the world today. It forms the basis of what most people understand. Internet to be—the World Wide Web. ![]()
Its purpose is to provide a lightweight protocol for the retrieval of Hyper. Text Markup. Language (HTML) and other documents from Web sites throughout the Internet. Each time you open a Web browser to surf the Internet, you are. HTTP over TCP/IP. HTTP was first ratified in the early 1. A simplistic first implementation of the protocol that only supported the option to get a Web page. HTTP/1. 0. Ratified by the IETF as RFC 1. This version added many supplemental data fields, known as headers to the specification. This allowed for other information passing between the client and server, alongside the request and. HTTP/1. 1. Defined in RFC 2. IETF, version 1. 1 implemented a number of improvements over and above the 1. One of the main improvements of 1. TCP connections, pipelining, and cache control to improve performance within HTTP- based applications. Most browsers these days offer support for both 1. One thing the RFC definitions are clear to point out. HTTP protocol should be backward compatible. That is to say that a browser implementing the HTTP/1. Conversely, a 1. 1 implementation on the server. It is well outside the bounds of this book to cover the HTTP protocols in huge detail, so let's concentrate on those elements most relevant to content switching. Basic HTTP Page Retrieval. Let's start at the beginning and see how a basic browser retrieves a Web page from a Web server. The first important point. Web page is typically made up of many dozens of objects, ranging from the HTML base through to the images that are present on the page. The HTML can be thought of as the template for the page overall, instructing the browser on the layout of the text, font sizes and. Think of the process, taking place in the following order: Client sends a request for the required page to the Web server. The server analyzes the request and sends back an acknowledgment to the client along with the HTML code required to make the page. The client will begin interpreting the HTML and building the page. The client, in subsequent requests, will retrieve any embedded objects, such as images or other multimedia sources. Once all elements of the page have been retrieved, the client browser will display the completed Web page. The order and timing. HTTP is used—1. 0 or 1. HTTP does not only offer a mechanism for the client to receive data from the server, but also other communication types such as. Such mechanisms are known within the HTTP specifications as a method. Table 3- 1 shows the supported method types in HTTP/1. Table 3- 1. The HTTP Method Headers in HTTP/1. HTTP/1. 1. METHODDESCRIPTIONHTTP/1. HTTP/1. 1. GETRetrieve the information specified.✓✓HEADIdentical to the GET request, but the server must not return any page content other than the HTTP headers.✓✓POSTAllows the client to submit information to the server, used for submitting information from a form, etc.✓✓PUTAllows the client to place an item on the server in the location specified. ✓DELETEAllows the client to delete the item specified in the request. ✓TRACEAllows the client to see the request it made to the server. This acts as a loopback in effect. ✓OPTIONSAllows the client to determine the communications options available on the server. ✓In terms of general Web browsing, the GET and POST methods are by far the most commonly used. For a browser to build a standard. Web page, the GET method is used to retrieve each object individually, whereas for transactional Web sites implementing shopping. POST method will also be used. The HTTPURLThe URL is the most important piece of information that the client browser includes in any GET request. The URL is defined as being a combination of the host where the site is located, the scheme used to retrieve the page, and the full. Optionally, the URL may include information such as the TCP port number to be used or a unique reference point within a larger page. Figure 3- 1 shows the breakdown of an example URL. Figure 3- 1. An example URL and its components. The URI is also commonly used when referencing the location of documents within HTTP. The formal definition of the difference between a URL and a URI is simple: A URI is a URL without the scheme defined. Persistent Connections in HTTPOne of the other major differences in operation between HTTP/1. HTTP/1. 1 is the handling of TCP connections required to retrieve a full Web page. Given that a client will typically have to retrieve multiple objects to. Web page, it is often inefficient to open and close TCP sessions repeatedly when retrieving objects from the same server. To improve the overall performance of HTTP in this instance, the protocol defines the Connection: header that communicates to the server whether the TCP session should be closed or remain open once the object has been retrieved. The Connection: header has two options. Connection: Closed. The default for HTTP/1. Connection: Keep- Alive. The default for HTTP/1. The Closed state indicates that the server should close the TCP connection once the request has been fulfilled. The Keep- Alive state indicates that the server should keep the TCP connection open after the request has been fulfilled. Along with an obvious performance increase from removing the need to. TCP connections, the Keep- Alive state also allows the implementation of pipelining. Pipelining allows a client to send multiple HTTP GET requests over the same TCP connection without needing to wait for individual responses after each. Figure 3- 2 shows the difference in these connection types. Figure 3- 2. The difference in TCP handling between HTTP/1. HTTP/1. 1. The final piece in the puzzle of interaction between client and server is in opening multiple TCP connections. We've already seen that a client can open a persistent TCP connection to the server and pipeline HTTP requests. To further improve performance of the HTTP operation, many browsers will open several simultaneous connections. Figure 3- 3 gives examples of pipelining and multiple connections. Figure 3- 3. Implementing pipelining and multiple connections as performance mechanisms. Other HTTP Headers. The HTTP protocol includes definitions for dozens of headers that can be included in the client- to- server and server- to- client requests. We will not attempt to list and describe all those available here; for a full description, the RFC for HTTP/1. HTTP/1. 1 offers a better source. The RFCs define a series of standard headers, which can be complemented by adding user- defined. As headers are ASCII readable text in every HTTP request and response pair, they can prove very useful in the implementation of content switching. Let's look at some of the. HTTP headers most commonly used in content switching. The "Accept: " Header. The client browser uses the "Accept: " header to indicate to the server which content and media types can be accepted. Examples of the "Accept: " header include. Accept: */*Accept anything. Accept: text/plain; text/html. Accept plain text and HTMLAccept: text/html; image/jpeg; image/bmp. Accept HTML and JPEG and bitmap images. The "Accept: " header is useful in the context of content switching to be able to determine the capabilities of a particular client. If. the client browser cannot accept images, for example, the request can be directed to a server optimized to deliver text- only. Web pages. The "Host: " Header. One of the main problems in the original HTTP/1. GET request sent to the server. This represents a problem if virtual hosting is used within a Web server. Web sites and needs to use this host information to determine which. Within the HTTP/1. HTTP/1. 0 browsers, support was added for the "Host: " header.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
November 2017
Categories |