HTTP VERSION
-HTTP uses a "<major>.<minor>" numbering scheme to indicate versions of the protocol.
-The protocol versioning policy is intended to allow the sender to indicate the format of a message and its capacity for understanding further HTTP communication, rather than the features obtained via that communication.
-No change is made to the version
number for the addition of message components which do not affect
communication behavior or which only add to extensible field values.
- The <minor> number is incremented when the changes made to the
protocol add features which do not change the general message parsing
algorithm, but which may add to the message semantics and imply
additional capabilities of the sender.
-The <major> number is
incremented when the format of a message within the protocol is
changed.
-Proxy and gateway applications must be careful in forwarding requests that are received in a format different than that of the application's native HTTP version.
-Since the protocol version indicates the protocol capability of the sender, a proxy/gateway must never send a message with a version indicator which is greater than its native versio
-Requests with version lower than that of the application's native format may be upgraded before being forwarded the proxy/gateway's response to that request must follow the server requirements
EIGHT DIFFERENT METHODS
HTTP actually identifies eight different methods which indicate what the desired action is and what action should be performed.
1.HEAD
-Asks for the material in a GET request, but without the response body.
The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.
2.GET
-Since the protocol version indicates the protocol capability of the sender, a proxy/gateway must never send a message with a version indicator which is greater than its native versio
-Requests with version lower than that of the application's native format may be upgraded before being forwarded the proxy/gateway's response to that request must follow the server requirements
EIGHT DIFFERENT METHODS
HTTP actually identifies eight different methods which indicate what the desired action is and what action should be performed.
1.HEAD
-Asks for the material in a GET request, but without the response body.
The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.
2.GET
Requests the representation of a specified source with a response body.
3.POST
Submits the data to be processed from an HTML form to the identified source. It used to request that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line. POST is designed to allow a uniform method to cover the following functions:
3.POST
Submits the data to be processed from an HTML form to the identified source. It used to request that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line. POST is designed to allow a uniform method to cover the following functions:
- Annotation of existing resources
- Posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles;
- Providing a block of data, such as the result of submitting a form, to a data-handling process
- Extending a database through an append operation.
4.PUT
Uploads a representation of the source that has been specified. PUT method requests that the enclosed entity be stored under the supplied Request-URL. If the Request-URL refers to an already existing resource, the enclosed entity SHOULD be considered as a modified version of the one residing on the origin server. If the
5.DELETE
Deletes a specific source. The DELETE method requests that the origin server delete the resource identified by the Request-URI. This method MAY be overridden by human intervention (or other means) on the origin server. The client cannot be guaranteed that the operation has been carried out, even if the status code returned from the origin server indicates that the action has been completed successfully.
4.PUT
Uploads a representation of the source that has been specified. PUT method requests that the enclosed entity be stored under the supplied Request-URL. If the Request-URL refers to an already existing resource, the enclosed entity SHOULD be considered as a modified version of the one residing on the origin server. If the
5.DELETE
Deletes a specific source. The DELETE method requests that the origin server delete the resource identified by the Request-URI. This method MAY be overridden by human intervention (or other means) on the origin server. The client cannot be guaranteed that the operation has been carried out, even if the status code returned from the origin server indicates that the action has been completed successfully.
6.TRACE
This echoes back a specific request so that the user can see what servers are adding or changing the request. The TRACE method is used to invoke a remote, application-layer loop-back of the request message.
7.OPTIONS
Used the check the functionality of a web server by returning the HTTP methods that the server supports for a specified URL.The OPTIONS method represents a request for information about the communication options available on the request/response chain
8.CONNECT
Facilitates SSL-encrypted communication through an unencrypted HTTP proxy by converting the request connection to a transparent TCP/IP tunnel.This specification reserves the method name CONNECT for use with a proxy that can dynamically switch to being a tunnel.
ADVANTAGES
1.Same as HTTP, only encrypted for security purposes.
HTTPS (Hypertext Transfer Protocol over Secure Socket Layer, or HTTP over SSL) is a Web protocol built into its browser that encrypts and decrypts user page requests as well as the pages that are returned by the Web server and developed by Netscape. HTTPS is really just the use of the Netscape’s Secure Socket Layer (SSL) as a sublayer under its regular HTTP application layering.
2. Well defined standard that is fairly easy to write clients and servers for
3. Interoperable, cross-platform, cross-language, ubiquitous
4. Caching, proxies, load balancing... there are lots of well-known and fairly easy ways to scale systems built around HTTP
5. the most used method [GET] is the most optimized, and the 1.1 protocol goes to great lengths to define how intermediate systems can cache objects -- following the HTTP principles gives you a lot of leverage to design your system to achieve maximum performance
6. The GET, PUT, and DELETE operations are just like the actions I end up coding over and over in Stateless Session facades for Data Transfer Objects...
7. human and machine readable, just like XML (at least XML used to be)
DISADVANTAGES
1. Plain text headers are somewhat inefficient (message bodies can be compressed and returned with a "Content-Encoding: gzip" entity header)risks:
2. Corruption of the protocol by avoiding the core verbs (web services are too POST-centric for me)
3. Web browser mentality: to really understand HTTP, stop thinking of browsers and servers, since browsers really only do GET and POST, most people aren't aware that PUT and DELETE are verbs they could be using...
HTTP vs. HTTPS
With HTTP, the Web page is transmitted without any encryption. However, HTTPS (HTTP Secure) is used to encrypt sensitive data such as credit card and social security numbers.
CREDIT 1
CREDIT 2
No comments:
Post a Comment