Web Services and HTTP protocols

Source: Internet
Author: User

Web Services and HTTP protocols


HTTP Hypertext Transfer Protocol;

Hyperlinks:

Web:

http/0.9: Only plain text is supported, including hyperlinks

HTML: Language for writing hypertext


Browser: Client


URI: Global scope, Uniform Resource Identifier

Unity: Unity in the path format


RUL: Uniform Resource Locator

Protocol://host:port/path/to/file


Http://www.mylinux.com/download/linux.tar.gz


Web resources: Http://www.mylinux.com/logo.gif

Multiple resources may be integrated into one HTML resource


Web objects:


HTTP method:

GET

Http/1.0:put,post,delete


MIME: Multi-purpose Internet Mail extension


SMTP: Simple Mail Transfer Protocol, only plain text transfer

MIME: The non-textual data is re-encoded in text format before it is transmitted, and the receiver can revert it back to its original format in the reverse format, and can invoke the appropriate program to open the file.

Base64


Protocol Header:

Image/jpeg


Dynamic effects:

Java,applet,jre


Dynamic Web page: server-side stored document non-HTML format, but programming language development script, script accepts parameters and then run the server once, after the completion of the run will produce HTML-formatted documents

web:index.php


web-->protocol-->php (Running index.php)


Dynamic Web pages: contains static content and dynamic content

Dynamic Content section does not need to run


Cache:


HTTP message: Request message, corresponding message


Syntax for request messages:

<method> <request-URL> <version>

Message body

<entity-body>


Response Message Syntax:

<version> <status> <reason-phrase>

Message body

<entity-body>


Status code:

1XX: Pure Information

2xx information about the "Success" category (200,201,202)

3XX Redirection class information (301,302,304)

4XX Client Error class information (404)

5XX Service-Side error class information


Sample Request message:

get/http/1.1

Host:www.xxxxx.com

Connection:keep-alive


Response message:

http/1.1 OK

x-powered=by:php/5.2.17

Vary:accept-encoding.cookie,user-agent

Cache-control:max-age=3,must-revalidate

Content-encoding:gzip

Content-length 6931


The first line of the above 2 messages is often referred to as the "start line" of the message, and the contents of the following label format are called the header field, each header city consists of a name (name) and a value, separated by commas, In addition, the response message usually has an information body called body, which responds to the client's class capacity.


The principal operation of the Web server

1. Establish a connection ———— accept or deny client connection requests;

2. Accept requests ———— Read HTTP request messages over the network;

3. Process the request ———— parse the request message and make the corresponding action;

4. Access to resources ———— the resources associated with access to the requested messages;

5. Build the response ———— use the correct header to generate HTTP response messages;

6. Log ———— when the completed HTTP thing is logged into the log file;



HTTP, TCP: Three-time handshake, four-time disconnection


http/1.1:

Enhanced caching capabilities

Long connections

Www.netcraft.com






This article from "Linux operation and Maintenance" blog, declined reprint!

Web Services and HTTP protocols

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.