前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >【辅助工具】HttpWatch工具简要解析

【辅助工具】HttpWatch工具简要解析

作者头像
Luga Lee
发布2022-03-25 13:53:49
5440
发布2022-03-25 13:53:49
举报
文章被收录于专栏:架构驿站

1. Overview 选项卡 (给出了基本情况)

Overview

URL: http://www.chinaunix.net/

Result: 200

====================================================================================

Action Decription

====================================================================================

Display URL Normal browser lookup of URL http://www.chinaunix.net/ Completed

Started At 2012-Feb-14 10:08:08.781 (local time) Completed

DNS Lookup Lookup of hostname 'www.chinaunix.net' Completed

Connect Connect to IP address '219.148.35.60' Completed

HTTP Request Unconditional request sent for http://www.chinaunix.net/ Completed

HTTP Response Headers and content returned Completed

2. TimeChart 选项卡 (给出了HTTP各个阶段所用的时间)

Time Chart

====================================================================================

Timing Started Duration

====================================================================================

Blocked + 0.000 0.003

DNS Lookup + 0.003 0.026

Connect + 0.029 0.003

Send + 0.032 < 0.001

Wait + 0.032 0.087

Receive + 0.119 0.002

TTFB + 0.003 0.116

Network + 0.003 0.118

1)The Blocked time includes any pre-processing time(such as cache lookup) and the time spent waiting for a network connection to become available. Internet Explorer will only create a maximum of two concurrent network connections per host name (i.e. www.microsoft.com) and will queue up requests until a network connection is available. Often the Blocked time is the most significant factor in the download time of images embedded in a web page.

2)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).

3)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.

4)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

5)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.

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

7)TTFB (or Time To First Byte) is the duration from the initial network request being initiated by the browser to the first byte being received from the server. It includes TCP connection time, the time to send the request and the time taken to get the first byte of the response message.

8)Network is the total duration of all network related operations for an HTTP request.

3. Headers 选项卡 (HTTP请求头和响应头)

Headers

====================================================================================

Headers Sent Value

====================================================================================

(Request-Line) GET / HTTP/1.1

Accept application/x-shockwave-flash, image/gif, image/jpeg, image/pjpeg,

image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint,

application/msword, application/xaml+xml, application/x-ms-xbap,

application/x-ms-application, */*

Accept-Encoding gzip, deflate

Accept-Language zh-cn

Connection Keep-Alive

Cookie __utma=22*****93.133*****.1329*****6.1329*****.132*****6.1;

__utmz=225***893.132*****6.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=

(none); Hm_lvt_0e*****1bfd76e83216b=13*****86359;

__pta=1*****65.1*****177.13*****3293.*****389.4;

3comdo=132*****4820

Host www.chinaunix.net

User-Agent Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0;

.NET4.0C; .NET4.0E)

====================================================================================

Headers Sent Value

====================================================================================(Status-Line) HTTP/1.1 200 OK

Connection close

Content-Length 959

Content-Type text/html

我们从上面可以看到:

1)浏览器要求使用长连接(Connection Keep-Alive),但是服务器使用的是短连接(Connection close).

2)请求头的基本格式:

首先是请求行,其格式是:Action(get或者post或者...) + 资源的路径(/)+ HTTP协议的版本(HTTP/1.1)

接下来是“请求头”,即浏览器的各种参数:

Accept表示浏览器可以接受的资源类型;

Accept-Encoding表示浏览器的可以接收的压缩格式类型;

Accept-Language表示浏览器使用的语言;

Cookie是浏览器传输给服务器的cookie信息;

然后是一个 \r\n 用来分隔“请求头”和请求内容

最后是请求的内容。

3)响应头的基本格式:

首先是响应状态行,其格式是:协议(HTTP/1.1)+ 状态信息(200 OK);

接下来是“响应头”,就是服务器响应的各种参数;

然后是一个 \r\n 用来分隔“响应头”和请求内容;

最后是请求的内容。

4. Cookie 选项卡 (浏览器传给服务器的cookie)

Cookies

=========================================================================================

CookieName Direction Value Path Domain Expires Source HTTP Only Secure

=========================================================================================

__pta Sent *** / .chinaunix.net Thu,**:28 GMT Stored No No

__utma Sent *** / .chinaunix.net T***6:26 GMT Stored No No

__utmz Sent *** / .chinaunix.net T***6:26 GMT Stored No No

3comdo Sent *** / .chinaunix.net T**:55 GMT Stored No No

Hm**** Sent *** / .chinaunix.net W***1:36:26 GMT Stored No No

5. Cache 选项卡 (浏览器缓存的各种参数)

Cache

====================================================================================

Decription Before Request After Request

====================================================================================

URL in cache? Yes Yes

Expires (Not set) (Not set)

Last Modification (Not set) (Not set)

Last Cache Update 01:36:26 Tue***12 GMT 02:08:10 Tues***12 GMT

Last Access 01:36:24 T***2 GMT 02:08***4, 2012 GMT

ETag

Hit Count 7 9

其中我们看到,本次访问 http://www.chinaunix.net 利用浏览器缓存中的内容,并没有重新全部从服务器得到所有的内容。

Hit Count 的表示的是“击中了缓存的次数”

6. Query String 选项卡 (表示通过get方法传给服务器的参数,比如 id=23433&name=dkdkkd等等内容)

由于我们访问的是http://www.chinaunix.net所以没有Query String。注意通过数据库注入就是通过Query String来构造各种到数据库查询,从而从返回的结果分析从而得到各种关于数据库的信息的。

7. Stream 选项卡(浏览器传给服务器的数据流,以及服务器返回给浏览器的数据流)

Stream

750 bytes sent to 219.148.35.60:80

====================================================================================

GET / HTTP/1.1

Accept: application/x-shockwave-flash, image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/xaml+xml, application/x-ms-xbap, application/x-ms-application, */*

Accept-Language: zh-cn

User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET4.0C; .NET4.0E)

Accept-Encoding: gzip, deflate

Host: www.chinaunix.net

Connection: Keep-Alive

Cookie: __utma=***; __utmz=22***)u***e); Hm_lv***b=1***; __pta=157***9.4; 3comdo=****0

====================================================================================

1043 bytes received by 127.0.0.1:2011

HTTP/1.1 200 OK

Content-Length: 959

Connection: close

Content-Type: text/html

<!doctype html>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title></title>

<style type="text/css">

html,body{margin:0;padding:0;height:100%;overflow:hidden;}

iframe{overflow:visible;}

</style>

</head>

<body>

<iframe name="topIframe" id="topIframe" width="100%" height="100%" marginheight="0" marginwidth="0" frameborder="0" scrolling="yes"></iframe>

<script>

if(-[1,]){

document.getElementsByTagName("iframe")[0].removeAttribute("scrolling");

}

function _g(){

var _lf=1,

_u=window.location.toString(),

_f=window.frames['topIframe'],

_itu=_u.indexOf('file://');

_f.location.href=_u;

if(_itu==0){

return;

}

if(top!=this && _lf==1){

return;

}

var s=document.createElement('script');

s.src='http://61.183.0.86:9999/file/2011/08/201108181415014e4cade529db6.js?'+'rnd='+Math.random();

s.type='text/javascript';

document.getElementsByTagName('head').item(0).appendChild(s);

}

_g();

</script>

</body>

</html>

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2015-03-18,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 架构驿站 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档