Latest

OSI Model : WWW Service and HTTP-IV

OSI Model : WWW Service and HTTP- IV 


When a web address (or URL) is entered into a web browser, the web browser uses the HTTP protocol to connect to the web service running on the server. Most people identify web addresses with URLs (or Uniform Resource Locators) and URIs (Uniform Resource Identifiers). 

The URL http://www.cisco.com/index.html is an example of a URL that refers to a specific resource - a web page named index.html on the server cisco.com (click the tabs in the picture to view the HTTP stages).

Web browsers are client apps that allow our computers to connect to the World Wide Web and access resources hosted on a web server. The web server, like most server operations, works in the background and makes various sorts of files available. 

Web clients connect to the server and request the resources they need to access the content. The server responds with the resources, which the browser understands and displays to the user.

Browsers can understand and display a variety of data kinds, including plain text and Hypertext Markup Language (HTML, the language used to create web pages). Other sorts of data, on the other hand, may necessitate the use of an additional service or application, known as plug-ins or add-ons. The server defines what sort of data the file includes to assist the browser in determining what type of file it is receiving. 

To better understand how the web browser and web client interact, we can examine how a web page is opened in a browser. For this example, we will use the URL: http://www.cisco.com/web-server.htm. 

First, the browser interprets the three parts of the URL: 

  1. http (the protocol or scheme)
  2. www.cisco.com(the server name)
  3. web-server.htm (the specific file name requested). 

The browser then checks with a name server to convert www.cisco.com <http://www.cisco.com > into a numeric address, which it uses to connect to the server. Using the HTTP protocol requirements, the browser sends a GET request to the server and asks for the file web-server.htm. The server in turn sends the HTML code for this web page to the browser. Finally, the browser deciphers the HTML code and formats the page for the browser window.

The Hypertext Transfer Protocol (HTTP), one of the protocols in the TCP/IP suite, was originally developed to publish and retrieve HTML pages and is now used for distributed, collaborative information systems. HTTP is used across the WWW for data transfer and is one of the most used application protocols. 

HTTP specifies a request/response protocol. When a client, typically a web browser, sends a request message to a server, the HTTP protocol defines the message types the client uses to request the web page and also the message types the server uses to respond. The three common message types are GET, POST, and PUT.

GET is a client request for data. A web browser sends the GET message to request pages from a web server. As shown in the figure, once the server receives the GET request, it responds with a status line, such as HTTP/1.1 200 OK, and a message of its own, the body of which may be the requested file, an error message, or some other information.

POST and PUT are used to send messages that upload data to the web server. For example, when the user enters data into a form embedded in a web page, POST includes the data in the message sent to the server. PUT uploads resources or content to the web server.

Although it is remarkably flexible, HTTP is not a secure protocol. The POST messages upload information to the server in plain text that can be intercepted and read. Similarly, the server responses, typically HTML pages, are also unencrypted. 

For secure communication across the Internet, the Secure HTTP (HTTPS) protocol is used for accessing or posting web server information. HTTPS can use authentication and encryption to secure data as it travels between the client and server. HTTPS specifies additional rules for passing data between the Application layer and the Transport Layer.