Web Application Development_HTML

Hypertext Transfer Protocol

1.
Browser->DNS server->(IP)Browser
Browser->(TCP/IP)Web server[SYN connection]->Browser[SYN-ACK connection]->Web server[ACK]
Browser->(HTTP request)Web server->(HTTP response)Browser

2.Ports:
Telnet(23),SMTP(25),MySQL(3306)
for web servers:
Deployment:HTTP(80),HTTPS(443)
Development:HTTP(8000or8080),HTTPS(8843)

3.
HTTP request:

:

:




METHODS:
Safe:GET HEAD TRAE OPTIONS
idempotent:PUT DELETE(allowed to change the server,can have side-effect,but multiple option should have same effect as once)
update:POST(arbitrary changes)

Get:to retrieve data, can be cached, url length less than 2048, only ASCII
/test/demo_form.asp?name1=value1&name2=value2

Post:to post data, cannot be cached, no length limitation, all types(binary)
POST /test/demo_form.asp HTTP/1.1
Host: w3schools.com
name1=value1&name2=value2

HEAD: similar with get, but only response http header, without bofy
PUT: upload URI(http://blog.csdn.net/yangruibao/article/details/7898788)
DELETE: delete resource
OPTIONS: response supported HTTP method
CONNECT:change connection into TCP/IP

4.
HTTP response:

:

:

(Content-Type,Content-Length)


(\r\n)

return content(a sequence of bytes with an associated MIME type)

Leave a Reply