1 / 9

Building and Managing Web Sites

Learn the basics of HTTP, the protocol that is the foundation of web requests. Understand how servers handle client requests and send responses. Explore common status codes and content types.

fentress
Télécharger la présentation

Building and Managing Web Sites

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. Building and Managing Web Sites HTTP Fundamentals Server Fundamentals

  2. HTTP Introduction • HTTP -- Hypertext Transfer Protocol • HTTP is the protocol that WWW requests are based upon. • Standard maintained by W3C at http://www.w3.org/Protocols/ • HTTP specification defines how client requests content from a server and how a server returns a response to the client. Server Fundamentals

  3. HTTP Introduction • Two different versions, 1.0 and 1.1 • Version 1.1 more efficient with larger pages. • HTTP supports many request types: • PUT and DELETE not commonly used • GET and POST are primary types. Server Fundamentals

  4. Web Server Fundamentals A webserver is software that does the following: • Server receives requests from browser/client for resources • A resource is any chunk of information that can be identified by a URL like HMTL or image files, scripts, streaming media, etc. • Server retrieves and/or processes the resource • Server sends the resource back to the client • Server logs the transaction • Responses/requests occur using the HTTP protocol, typically on port 80 Server Fundamentals

  5. Sample HTTP Exchange To retrieve the resource at http://www.host.com/path/file.html Browser sends request to host www.host.com, port 80: GET /path/file.html HTTP/1.0 From: 105.123.456.789 User-Agent: Mozilla/4.01 The server sends a response back to the client: HTTP/1.0 200 OK Date: Fri, 31 Dec 1999 23:59:59 GMT Content-Type: text/html Content-Length: 1354 <html><body><h1>Happy New Millenium!</h1> (more file contents) </body> </html> Server Fundamentals

  6. Response Status Line • Includes three parts separated by spaces • the HTTP version • a response status code that gives the result of the request • An English reason phrase describing the status code. • Typical status lines are: HTTP/1.0 200 OK or HTTP/1.0 404 Not Found Server Fundamentals

  7. Common Response Status Codes • 200 OK - Request succeeded, resulting resource is returned in the message body • 404 Not Found --The requested resource doesn't exist. • 301 Moved Permanently • 302 Moved Temporarily • 303 See Other(HTTP 1.1 only) Resource has moved to another URL (given by the Location: response header), and should be automatically retrieved by the client. • 500 Server Error -- Unexpected server error. Common caused by a server-side script that has bad syntax, fails, or otherwise can't run correctly. Server Fundamentals

  8. Response “Content-Type” • Response header includes “Content-Type” to tell client/browser how to handle the resource (display a browser or launch an application/plug-in) • Based on MIME types for email attachments • Broad types: text, image, audio, video, application • Many different subtypes, always new ones. • E.g., Content-Type: text/html • Most webservers software have a list of common types – must define new subtypes on webserver Server Fundamentals

  9. FrontPage and HTTP • FrontPage uses the HTTP commands PUT and DELETE • FrontPage can be sensitive to Proxy Servers that intercept HTTP requests. • Can also attach via FTP. Server Fundamentals

More Related