Differences

This shows you the differences between two versions of the page.

Link to this comparison view

http_request_reponse_phases [2016/09/03 13:59] (current)
anthony created
Line 1: Line 1:
 +Some Meta Tags that useful information based on the HTTP headers:
  
 +<META HTTP-EQUIV="​charset" ​   CONTENT="​iso-8859">​
 +
 +This tag sets the characterset to be used for the page. ISO 8859 is the International Standards Organization character set for most Latin based languages.
 +
 +<META HTTP-EQUIV="​Refresh"​ Content="​1800">​
 +
 +This will set the browser to refresh the content from the original source every 1800 seconds.
 +
 +<META HTTP-EQUIV="​Refresh"​ Content="​5,​ URL)
 +
 +This will redirect the browser to a new page( indicated in URL in 5 seconds)
 +
 +<META HTTP-EQUIV="​Pragma"​ CONTENT="​no cache">​
 +
 +This will prevent the browser from storing the document in the browsers'​ cache on the users' system.
 + 
 + 
 +
 +HTTP 1.0 (Hypertext Transfer Protocol)
 +
 +(The RFC  for this protocol can be retrieved here
 +
 +The process by which a user surfs the Internet:
 + 
 +
 +    The browser sends a request by inputting a URL/URI
 +    The request is broken down and addressed by TCP/IP
 +    HTTP headers are added in the request phase (see request phase headers)
 +    The browser requests a DNS to map the URL to an IP address
 +    The browser sends out the request
 +    The request is accepted by the server
 +    The daemon listens to a specific port for incoming requests
 +    Upon recieving a request, the daemon reassembles the packets and interprets the HTTP headers
 +    The daemon checks the Method (see Methods) for the Request and other information
 +    If the daemon is running in inetd it:
 +        Performs the task itself
 +    If it us running in standalone mode, it:
 +        Assigns a child process to perform the task, if no child exists it spawns one. If the child has completed the  maximum number of  tasks assigned to it, the daemon graduates the child (a polite way of saying kills). This is a number of tasks set by the server. The daemon can assign more than one child to complete multiple tasks at once.
 +    The child completes the request
 +    The child (not necessarily the same one) creates a response phase header and the daemon attaches it to the files to be sent outbased upon the success of the transaction.
 +    The daemon attaches a status code in the response phase headers
 +    The data is broken down in the TCP/IP and sent out to the IP address listed in the request phase header
 +    The data is sent back to the browser were it is reassembled,​ stripped of the header and displayed in the browser
 +
 +
 + 
 + 
 +
 +Request Phase Headers
 + 
 + 
 +Header Description
 +From Email of the user
 +User-Agent Name and version of browser
 +Date Current date
 +Accept Files Type of files the browser will accept (MIME Type)
 +Accept-Encoding Compression that will be accepted by the browser
 +Accept-Language Language that the browser will accept
 +Authorization If required
 +If-Modified-Since Will only return file if modified since ...
 +Content-Length Byte size of the data to follow
 +Host If the host is virtual, who is it
 +Cookie If there is cookie for this site, the browser will send it
 +
 +
 + 
 +
 +Response Phase Headers
 + 
 +Header Description
 +Server Name and version of the server software
 +Date Current Date
 +Last-Modified Date the data was last modified
 +Expires Date the current data expires
 +Location If the data has been redirected internally, where it is ...
 +Pragma Pragma options read from the META tags of the data (i.e.. no-cache)
 +MIME version Version of MIME used
 +Content-Language Language the server is responding in
 +Content-Length Byte size of data
 +Content-Type MIME Type
 +Content-Encoding Type of compression of data
 +Content-Encoding-Method Ascii or Binary, 7-bit or 8-bit
 +Allowed Methods the browser is allowed to use
 +WWW-Authenticate If Authentication required
 +Message ID If any
 +Set-Cookie Give the browser a cookie
 +
 +Methods
 +
 +Get
 +     Get the required documents
 +
 +Put
 +    Not Specified in 1.0, but used to replace a document with some other data
 +
 +Head
 +    Return the header information
 +
 +Post
 +    Send data out (likely through a form) and have the server process it
 + 
 + 
 +
 +Status Codes
 +
 +The following codes indicate a successful requisition and response between the client and the server
 + 
 +Code Status Description
 +200 OK Everything processed correctly
 +201 Created The URL was created by POST
 +202 Accepted The request is accepted and will be processed
 +204 No Response No data
 +
 +The following codes are used if a URL has moved, redirected:
 + 
 + 
 +301 Moved The URL has moved to ...
 +302 Found The URL can be found at ...
 +
 +The following codes indicate there is an error on the client(browser) side:
 + 
 + 
 +400 Bad request Syntax error in URL
 +401 Unauthorized User isn't authorized (password based)
 +403 Forbidden User doesn'​t have permission
 +404 Not Found You haven'​t a clue
 +
 +The following codes indicate there is an error on the server side:
 + 
 + 
 +500 Internal Server Unexpected server error (likely script related)
 +502 Server Overloaded Server overloaded timed out
 +
 + 
 +
 +Definitions
 + 
 +
 +Child
 +
 +A process spawned by the daemon. A child will perform a task assigned to it by the daemon until such time as it has graduated. The daemon sets the number of tasks allowed and the number of childs to be created at one time.
 +
 +Daemon
 +
 +The "​manager"​(non-human) of a server that manages and performs processes in response to incoming requests.
 + 
 +
 +DNS
 +
 +Domain Name Service - The service by which a mnemonic name is mapped to an IP address.
 + 
 +
 +Inetd
 +
 +A mode in which the server runs in. When an incoming request is received, the daemon performs the task and upon completion returns to listen to the assigned port.
 +Mostly used for low activity functions like FTP.
 + 
 +
 +IP address
 +
 +A dotted quad bit number which is a unique identifier of a computer on the Internet. (ex. 142.204.1.2)
 +
 +MIME (Multipurpose Internet Mail Extensions)
 +
 +A standard method of formatting non-ascii files which enables users to transmit graphics and other non-HTML data in a browser
 +
 +Port
 +
 +A communication channel which is listened to by daemon dependent upon protocol or function. Specific functions are regularly assigned specific ports:
 +The following are the standard, but not required ports:
 + 
 +Port # Protocol
 +21 FTP
 +23 Telnet
 +25 SMTP
 +70 Gopher
 +80 HTTP
 +110 POP
 +119 NNTP (news)
 +
 +Pragma
 +
 +Specific Instructions to indicate the handling of a web document
 +
 +Standalone
 +
 +A mode in which the server runs in. The daemon acts as a manager and listens to requests on a port. When a request comes from a client, the daemon assigns a child to complete the request then returns to listening to the port. Upon completion of the task, the daemon sends out the response.
 +
 +TCP/IP
 +
 +Transmission Control Protocol/ Internet Protocol. A standard used for breaking down and addressing data for transport over a network.
 +
 +URL/URI
 +
 +Uniform Resource Locator/​Identifier - A mnemonic adducing system for retrieving data over the internet. the request is made by protocol, Fully Qualified Domain ​ Name(FQDN) and file name (i.e. http://​cns.senecac.on.ca/​Index.html)
 +
 +Sources:
 +
 +Berners-Lee et. al., RFC 1945 - HTTP 1.0
 +
 +Simonsen et al ,RFC 1341
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported