1 / 10

CITA 310 Section 2

CITA 310 Section 2. HTTP. How a Web Server Works. HTTP (Hypertext Transfer Protocol) defines how information is passed between a browser and a Web server. The two most popular Web servers are Apache from Apache Software Foundation Internet Information Services (IIS) from Microsoft

aflores
Download Presentation

CITA 310 Section 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CITA 310 Section 2 HTTP

  2. How a Web Server Works • HTTP (Hypertext Transfer Protocol) defines how information is passed between a browser and a Web server. • The two most popular Web servers are • Apache from Apache Software Foundation • Internet Information Services (IIS) from Microsoft • The original Web server from Microsoft available on Windows NT was Internet Information Server

  3. How a Web Server Works • As is true with other servers such as DNS, Web servers listen for communication at a port. • The default port is 80. • You can also create Web servers at port numbers greater than 1023. • Each Web server has a document root, which is where you store the HTML documents.

  4. Understanding HTTP • The current version of HTTP is 1.1. • Virtually no browsers are so old that they do not support 1.1. • HTTP is a stateless protocol, meaning that each Web page sent is independent of every other Web page sent. • This makes it more challenging to create a shopping cart application.

  5. Understanding HTTP • HTTP 1.1 supports persistent connections. • This allows the browser to receive multiple files in one TCP connection. • This can speed up communication. • Although you see a single page in your browser, it can be composed of many text and image files.

  6. URL Generalized Syntax • [scheme://] [username[:password]@] host[:port][/path] [?query][#fragment]

  7. HTTP Request Example • When the browser sends a request to a Web server, it looks like: GET /hello.htm HTTP/1.1 Host: www.technowidgets.com • The above requests the hello.htm file from the document root of the Web server. • It specifies the host of www.technowidgets.com. • There could be multiple hosts at the IP address.

  8. HTTP Methods • GET • HEAD • POST • PUT • OPTIONS • DELETE • TRACE • CONNECT

  9. HTTP Response Example • The following shows some of the headers along with the HTML that the Web server would send: HTTP/1.1 200 OK Server: Microsoft-IIS/6.0 Content-Type: text/html Last-Modified: Fri, 17 May 2008 18:21:25 GMT Content-Length: 43 <html><body> Hello World! </body></html> • The headers contain information about the page

  10. Sample HTTP Response Status Codes 200 OK • request succeeded, requested object later in this message 301 Moved Permanently • requested object moved, new location specified later in this message 400 Bad Request • request message not understood by server 404 Not Found • requested document not found on this server 505 HTTP Version Not Supported

More Related