application , web-services

Quick overview of HTTP Request messages

March 5, 2010

OPTIONS         Request information about available options

GET                Retrieve document identified in URL

HEAD              Retrieve meta information about document identified in URL

POST              Give information (e.g., annotation) to server

PUT                Store document under specified URL

DELETE           Delete specified URL

TRACE            Loopback request message

CONNECT        For use by proxies

HTTP response codes

1xx                Informational   Request received, continuing process

2xx                Success           Action successfully received, understood, and accepted

3xx                Redirection      Further action must be taken to complete the request

Web Server redirects activity to another server / location

4xx    Client error      Request contains bad syntax or cannot be fulfilled Web Pages renamed or moved

5xx    Server error      Server failed to fulfill an apparently valid request Web Hosting / Administrative issues

Not Modified 304

If the client has done a conditional GET and access is allowed, but the document has not been modified since the date and time specified in If-Modified-Since field, the server responds with a 304 status code and does not send the document body to the client.

Response headers are as if the client had sent a HEAD request, but limited to only those headers which make sense in this context. This means only headers that are relevant to cache managers and which may have changed independently of the document’s Last-Modified date. Examples include Date, Server and Expires.

The purpose of this feature is to allow efficient updates of local cache information (including relevant meta information) without requiring the overhead of multiple HTTP requests (e.g. a HEAD followed by a GET) and minimizing the transmittal of information already known by the requesting client (usually a caching proxy).

Transport issues in HTTP

  • Number of TCP connections
    • HTTP 1.0:
    • Separate connection for each embedded object of web page
    • Multiple parallel connections
    • HTTP 1.1:

Persistent connections and pipelining

  • Trade-offs with HTTP 1.0?
    • Web caching
      • Browser caching vs. proxy caching
      • HTTP responses can be redirected to cache from server, or from intermediate router
      • Servers assign “EXPIRES” header field to web pages, instructing caches for expiration date
      • Or, caches/clients can use HEAD request, or conditional GET request
  • WWW – Caching Web pages
    • Downloading HTML documents from servers can be slow due to a number of conditions:
        • Parts of the Internet can be congested
        • Dialup connection is typically very slow, 33Kbps or 56Kbps
        • Web server can have a lot of clients connecting to it at the same time, causing it to be overloaded.
      • If a user returns to previous HTML document, then this could require downloading the document from the server again.
      • A browser can hold copies of recently visited pages. This avoids having to download pages again.
      • An organization can use a HTTP proxy that caches documents for multiple users. Thus improving the speed at which pages can be displayed on each user computer.

www.bestitdocuments.com