Apache features and the infrastructure of the site

Source: Internet
Author: User
Tags error status code html form rfc

One, MIME

MIME (multipurposeinternet Mail Extensions) Multi-purpose Internet Mail extension type. Is the type of file that sets the extension of an application to be opened by an app, and when the extension file is accessed, the browser automatically opens with the specified application. Many are used to specify some client-customized file names, as well as some ways to open media files.

It is an Internet standard that expands the e-mail standard to enable it to support:

Non-ASCII word literals, non-text format attachment (binary, sound, image, etc.); a message body composed of multipart (multiple parts); header information (headerinformation) containing non-ASCII characters.

This standard is defined in RFC 2045, RFC 2046, RFC 2047, RFC 2048, RFC 2049, and so on. MIME improved RFC 2822, which was changed by RFC 822, which specifies that e-mail standards do not allow the use of characters other than the 7-bit ASCII character set in mail messages. Because of this, some non-English character messages and binary files, images, sounds and other non-text messages can not be transmitted in the E-mail (MIME). MIME defines a symbolic method for representing a wide variety of data types. In addition, a MIME framework is used in the HTTP protocol used in the World Wide Web, and the standard is extended to the Internet media type.

Role: MIME is intended to be a multi-mesh Internet Mail extension, which was designed to append multimedia data when sending e-mail, allowing the mail client to process according to its type.
In fact, as an accessory for large data transmission!

More information: http://baike.so.com/doc/1062163-1123665.html

Second, the HTTP request method

HTTP uses content types, which are the types of files that the Web server returns to a Web browser. All of these types are modeled on the MIME Internet Mail protocol, where the Web server tells the Web browser what kind of file it has, whether it is an HTML document, a GIF format image, a sound file, or a standalone application. Most Web browsers have a series of configurable helper applications that tell the browser how to handle the various types of content that the Web server sends over.

The HTTP communication mechanism is that during a complete HTTP communication, the following 7 steps will be completed between the Web browser and the Web server:

(1) Establishing a TCP connection

Before HTTP work begins, the Web browser first establishes a connection to the Web server over the network, which is done through TCP, which works with the IP protocol to build the Internet, known as the TCP/IP protocol family, so the internet is also known as a TCP/IP network. HTTP is a higher level of application-level protocol than TCP, according to the rules, only the lower layer protocol is established before it can be a more protocol connection, so the first to establish a TCP connection, the port number of the general TCP connection is 80

(2) Web browser sends request command to Web server

Once a TCP connection is established, the Web browser sends a request command to the Web server

Example: get/sample/hello.jsphttp/1.1

(3) Web browser sends request header information

After the browser sends its request command, it also sends some other information to the Web server in the form of header information, and then the browser sends a blank line to notify the server that it has ended sending the header information.

(4) Web server answer

After the client makes a request to the server, the server sends a reply back to the client,

http/1.1 OK

The first part of the answer is the version number of the protocol and the Answer status code

(5) The Web server sends the answer header information

Just as the client sends information about itself along with the request, the server also sends the user with the answer about its own data and the requested document.

(6) The Web server sends data to the browser

After the Web server sends a header message to the browser, it sends a blank line to indicate that the header information is sent to the end, and then it sends the actual data requested by the user in the format described by the Content-type reply header information

(7) The Web server shuts down the TCP connection

In general, once the Web server sends the request data to the browser, it closes the TCP connection and then if the browser or server joins this line of code in its header information

Connection:keep-alive

The TCP connection remains open after it is sent, so the browser can continue to send requests through the same connection. Maintaining a connection saves the time it takes to establish a new connection for each request and also saves network bandwidth.

More information: http://wenku.baidu.com/view/a8293a6c7e21af45b307a877.html

Third, the difference between SSL and HTTPS

is the security for the purpose of the HTTP channel, a simple HTTP security office, that is, HTTP to join the SSL layer, HTTPS security base is SSL, so the details of the encryption requires SSL, he is a URL scheme (abstract identifier system), syntax http: System. Used for secure HTTP data transfer, the system was originally developed by Netscape, which provides authentication and encryption methods of communication, and is now widely used in secure, sensitive communications on the World Wide Web, such as transaction payments

SSL Introduction:

The SSL Secure Sockets Layer protocol (secure Sochet layers) has been developed by Netscape to secure data transfer over the Internet, using data encryption (encryption) technology to ensure that it is not intercepted and tapped during transmission over the network. The current general specification 40bit security standards, the United States has introduced 128bit higher security standards, but restricted outbound, as long as the 3.0 version of IE or Netscape browser is supported SSL.

SSL is located between the Protocol TCP/IP protocol and various application layer, is an international standard encryption and authentication communication protocol, provides a reliable end-to-end security service for TCP, provides the confidentiality and integrality between two communication individuals, the SSL protocol can be divided into SSL record protocol and SSL handshake protocol.

More information: http://wenku.baidu.com/view/984e5d1255270722192ef754.html

Four, the working mode of Web server

Web services work by companies that obtain publishing information from the registry (ebXML or UDDI registry), establish execution procedures that meet the requirements, and then publish their services to the registry. Later, other companies found a service listed in the registry, agreeing to established standards and then doing business. Once the standards have been agreed and the agreed rules are met, the application can take over the transaction processing, thus eliminating the human interaction from the overhead of carrying out the business. In this model, applications can exchange information about the services the company wants to provide and consume by leveraging the existing infrastructure. In addition, the app can query the registry to find other apps (companies) that can offer the same service on more favourable terms.

More information: Http://www.tuicool.com/articles/FvYFBzR

Five, CGI: public Gateway Interface

CGI (Commongateway Interface) is one of the most important technologies in WWW technology, which has an irreplaceable important position. CGI is an interface standard between an external application (CGI program) and a Web server, which is the process of passing information between a CGI program and a Web server. The CGI specification allows the Web server to execute external programs and send their output to a Web browser, CGI turning a simple set of static hypermedia documents from the Web into a complete new interactive media.

Status code returned by httpd

1) HTTP common status code.

1XX: Informational Status code

100: Request to continue

101: Conversion Protocol

2XX: Success Status Code

200:ok, indicates that the request is not a problem.

201:created, creates a request for the server object.

202:accepted, the request has been accepted. The single server has not performed any actions yet.

203:non-authoritative information, entity header.

204:no Content, the response message contains several headers and a status line, but no body part of the entity.

205:reset Content, which is used primarily for browser code, tells the browser to clear all HTML form elements in the current page.

206:partial Content, a partial or range range request was successfully executed.

3xx: Redirect Status code.

301:move permanently, permanent redirection, using the header "Location:url" in the response message

302:found, temporary redirection, specifies the temporary resource location using the header "Location:url" in the response message.

303:not modified, condition is used in the request.

304:not modified, the client can make its request conditional by the included request header.

305:use Proxy, a resource must be accessed through a proxy.

4XX: Error status code for the client class.

400:bad request, which informs the client that it sent an error.

401:unauthorize certification.

402:payment Required reserved is not yet in use.

403:forbidden, the request was rejected by the server.

404:not found, the server could not find the requested URL.

405:method not allowed, which does not allow a URL to request a response using this method.

406:not acceptable, the server does not have an acceptable URL matching resource on the client.

407:proxy authentication Required, a proxy server that requires process authentication for resources.

408:request Timeout, the status code of the request timeout.

409:conflict, some of the conflicts that are raised when a resource is requested.

5XX: Error in server-side class.

500:internal server error, internal errors.

501:not implemented, the client-initiated request exceeds the capabilities of the server.

502:bad Gateway, the proxy server received a fake response from upstream.

503:service unavailable, the server cannot provide services at this time.

Apache features and the infrastructure of the site

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.