日期:2014-05-17  浏览次数:21161 次

一个http请求发出以后。。。
今天遇到一个问题,就是一个http请求发出以后接下来会做什么?他的request,response方法是怎么传值取值的。。。。求高手帮助。。。

------解决方案--------------------
百度 google中一搜索关键字 http request response 比较专业的解读一版一版
------解决方案--------------------
DNS Lookup
 DNS Lookup is the time required to resolve a host name (e.g. www.google.com) into a numeric IP address (e.g. 216.239.59.99).
 

 Connect
 Connect is the time required to create a TCP connection to the web server (or proxy). If a secure HTTPS connection is being used this time includes the SSL handshake process. Keep-Alive connections are often used to avoid the overhead of repeatedly connecting to the web server.
 

 Send
 Send is the time required to send the HTTP request message to the server and will depend on the amount of data that is sent to the server. For example, long Send times will result from uploading files using an HTTP POST.
 

 Wait
 Wait is the idle time spent waiting for a response message from the server. This value includes delays introduced due to network latency and the time required to process the request on the web server.
 

 Receive
 Receive is the time taken to read the response message from the server. This value will be depend on the size of the content returned, network bandwidth and whether HTTP compression was used.
 

------解决方案--------------------
访问web服务器就是向服务器发送请求, request代表客户端向服务器发送的请求, 然后服务器会向客户端做出响度,就是response
------解决方案--------------------
这涉及到了网络底层的数据传输问题了 呵呵
------解决方案--------------------
推荐你一本书 虽然是英文版 但是看起来并不难 HTTP Developer's Handbook
http请求也是在建立了tcp链接之后发字符串消息,你可以通过一些工具比如firebug的net面板看到http请求的内容,包括请求域(HOST),URI(get方法的话包括查询字符串,post方法的话应该是作为请求消息的实体内容)以及一系列http头部。
服务器端的request和response也都是根据这些http消息字符串分析出来的。