天天看點

HTTP 的請求過程?

當點選一個連結時,浏覽器首先找到站點的IP位址,這是通過DNS來實作的,在找到IP位址後就可以建立TCP連接配接了,連接配接建立後我們就可以發送請求了.但這個請求是什麼樣子的呢 ? 我們現在假設點選了一個從 www.webmonkey.com/HTML/96/47/Index2A , HTML 點選了WWW.GRIPY.ORG/MATTARG/ 這時浏覽器會發出下面的請求:

Get/MATTARG/HTML/1.0

User-Agent: Mozilla/2.0(macitosh;1;PPC)

Accept: text/html: */*

Cookie: name = value

Refetet: http://www.webmonkey.com/html/96/47/index2a.html

Host: www.gtippy.org
           
HTTP/1.0 200 Pound

Data: Mon 10 Feb 1997 23:48:22 GMT

Server: Apache/1.1 1 Hot&ired/1.0

Content-type: text/html

Last-Moditied: Tues,11 Feb 1997 22:45:55 GMT
           

[ 尐魚兒的QQ群:726994578 ] --- [ https://github.com/godmaybelieve ]