HttpWatch How to use

Source: Internet
Author: User
Tags gz file http request local time nets reset browser cache port number


HttpWatch Installation and opening



1. Download HttpWatch Pro, the professional version of the license file. Lic and installer are placed in the same folder. Run Setup and click "Next" to complete the installation.



2. To open IE browser, it is recommended to use the latest IE11 browser. The default httpwatch is turned on and appears below the page, and if you turn it off, you can use the shortcut key "Shift+f2" or "menu bar-> view-> Explorer Bar->httpwatch Professional".



HttpWatch examples to illustrate the following by logging into my mailbox mail.163.com example to show HttpWatch:



Click on "Record", in IE open the URL to be recorded, mail.163.com, enter the user name, password to complete the login operation



1.3.1 Overview (summary)



Indicates that an information is selected to display its profile



As shown in the red box above:



Url:http://mimg.163.com/external/closea_d.js



result:200



The requested URL is http://mimg.163.com/external/closea_d.js, and the returned HTPP status code results 200, indicating success;



Resync URL Browser requested Refresh if changed-http://mimg.163.com/external/closea_d.js



URL requested by the browser



started at 2008-jan-04 09:21:09.422 (local time)



Request start time (actual recorded time on this machine)



Connect connect to IP address ' 218.107.55.86 '



IP address of the requested URL



Http request unconditional request sent for Http://mimg.163.com/external/closea_d.js



HTTP request, when the browser makes a request to the Web server, it passes a block of data to the server, that is, request information



Http Response Headers and content returned



HTTP response, when the browser accepts the information returned by the Web server



2.3.2 Header (header)



Represents header information sent and received from a Web server;



Http://g1a90.mail.163.com/a/p/main.htm?sid=UBDCcOJJDknBulMFzSJJipPzfROMNqHO



As shown in the red box above:



HTTP request Hair Send message



Headers Sent Value



Request-line Get/external/closea_d.js http/1.1



In the above code, "get" represents the request method, "Closea_d.js" represents the URI, and "http/1.1 represents the version of the Protocol and Protocol."



Accept * * means all



Accept-encoding gzip, deflate



Accept-encoding indicates the type of content encoding that the browser can accept in addition to plain text, such as gzip compression or deflate compressed content.



Accept-language ZH-CN



A language that represents an acceptable return to data



Connection keep-alive



Keep TCP Requests connected



Note: Before HTTP work begins, the Web browser first establishes a connection to the Web server over the network, which is done through TCP, which, together with the IP protocol, builds the internet, known as the TCP/IP protocol family, so the internet is also called the tcp/ IP network. HTTP is a higher level of application layer protocol than TCP, according to the rules, only after the low-level protocol has been established in order to make a more layer of protocol connectivity, so first to establish a TCP connection, the general TCP connection port number is 80



Cookie vjuids=-1b9063da8.1173d33f879.0.9aab8b85a459d; vjlast=1199406314; _ntes_nnid=a1e69963f40453af8a9ad171cc4cd8da,0|tech|; ntes_ufc=3000000100000000000000000000000000000000000000000000000000000000; province=021;



city=021; Ntes_mail_firstpage=normal; Ntes_sess=68luouh9ewccbfyn5oxz_0qf._



Iomckfscagyrooxpjtvf7r8vx7jazg7hgdwo00gqen1zmrzcx7fmaxnb052r8xofzzyk.hn;



netease_ssn=mayingbao2002; netease_adv=11&23&1199409658752;



Coremail=vdeamrrrdfata%xcvwjixxsrlslkblhzxxzgqpjkexfknt



Cookies have nothing to say about the client record information



Host mimg.163.com



Requesting a connection's host name '



Referer Http://g1a114.mail.163.com/a/p/main.htm?sid=XCVwJiXXsRLSLkbLhZXXZGqPJkEXFKNt



Contains a URL that the user accesses the page of the current request from the page represented by the URL



User-agent mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1. NET CLR 1.1.4322;. NET CLR 2.0.50727)



Client Identity Browser type



HTTP Request header return information



Headers Received Value



Status-line http/1.0 OK



Represents HTTP server-side response return 200



Accept-ranges bytes



Unit of measure for HTTP request scope



Age 117



Represents the cached time after HTTP received a response to a request operation



Cache-control max-age=3600



A generic header to define a cache instruction



Connection keep-alive



Keep TCP Requests connected



Content-type Application/x-javascript



Indicates the MIME type of the entity sent or received



Date Fri, 2008 01:12:26 GMT



Date the HTTP message was sent



Etag "10f470-734-b32eb00"



An entity header that assigns a unique identifier to the resource being sent



Expires Fri, 2008 02:12:26 GMT



Specify the validity period of an entity



Last-modified Fri, 2008 01:01:00 GMT



Specify the date and time when the requested resource was last modified



Server Apache



A header marking the Web server software and its version number




Indicates that your HTTP request was returned by proxy server.



3.3.3 Cookies



Show Cookies Information



As shown above, city=021 is actually the value of setting city information in my 163 mailbox, 021 in cookies (representing the city of Shanghai)



Note:



What is a cookie? A cookie is a technique for maintaining HTTP state information at the client, which is a piece of data that is sent to the browser by the Web server in the HTTP response message header when the browser accesses a resource in the Web server. The data that the Web server sends to individual client browsers can vary.



The browser can decide whether to save this piece of data, and once the Web browser saves the data, it should pass the data back to the Web server on the HTTP request header each time it accesses the Web server.



Obviously, cookies were first sent by the Web server, and whether the cookies were sent and the details of the cookies sent were entirely determined by the Web server.



The process by which cookies are routed between the browser and the Web server is shown in Figure 7.1.



4.3.4 Cache (cached)



Display details in the URL address bar of the browser cache before and after the request is completed



5.3.5 Query string (query strings)



The display query string is used in the pass parameter URL



As shown in the following illustration:



Http://reg.yodao.com/setcookie.jsp?username=mayingbao2002&domain=yodao.com&loginCookie=



ualr3t2p5wki_ku90vyy04gk1mamttmzygfxdsppqrz3zhjswz8jzdlvjmxeipssx2hn__



W3zsobsfu6gkrzyrudigzyzvcix&clearpersistcookie=



The mayingbao2002 string, as shown in the red box above, is the parameter that exists at the URL passed by the request



6.3.6 POST Data



Display data information by post mode



The following is the post Data in the mail.163.com login process, as shown in the following illustration:



https://reg.163.com/logins.jsp?type=1&url=http://fm163.163.com/coremail/fcg/ntesdoor2?lightweight=1& Verifycookie=1&language=-1&style=-1



Above the red box: application/x-www-form-urlencoded, Post Way default submit data encoding



Note: The following are several ways of submitting data encoding in post mode:


Text/plain Transfer as plain text
application/x-www-form-urlencoded The default encoding form, which is the URL encoding form
Multipart/form-data MIME encoding, the form that uploads the file must select the


Mime type refers to types such as Text/html,text/xml



MIME (Multipurpose Internet email Extension), intended for Multipurpose Internet Mail Extensions, is a multipurpose Internetwork Mail Extension protocol that was first applied to the e-mail system in 1992, but later applied to browsers. The server tells the browser the type of multimedia data they send, and the notification means the MIME type of the multimedia data, which lets the browser know what the received information is MP3 files, which are JPEG files, and so on. When the server transmits the output to the browser, the browser must start the appropriate application to process the output document. In HTTP, a MIME type is defined in a partial content-type.


Data type MIME type
Hypertext Markup Language text. htm,.html file Text/html (Data category is text, kind is HTML, same below)
Plain text,. txt file Text/plain
RTF text,. rtf file Application/rtf
GIF graphics,. gif files Image/gif
JPEG graphics,. jpeg,. jpg files Image/jpeg
Au voice,. au file Audio/basic
Midi music, Mid,.midi files Audio/midi,audio/x-midi
RealAudio music,. ra,. ram files Audio/x-pn-realaudio
Mpeg,.mpg,.mpeg file Video/mpeg
Avi,.avi file Video/x-msvideo
gzip,.gz file Application/x-gzip
Tar,.tar file Application/x-tar


As shown in the red circle above, you can see the password and username data in post data;



Note: The difference between get method and post method



Get method



The Get method is the default HTTP request method that we use to submit the form data on a daily basis, but the form data submitted with the Got method is simply encoded, and it will be sent as part of the URL to the Web server, so If you use the Get method to submit the form data, there is a security risk. For example



Http://127.0.0.1/login.jsp?Name=zhangshi&Age=30&Submit=%e+



From the URL request above, it is easy to identify the content submitted by the form. The amount of data submitted is not too large due to the data submitted by the Get method as part of the URL request



Post method



The Post method is an alternative to the Get method, which mainly submits form data to the Web server, especially large quantities of data. The Post method overcomes some of the drawbacks of the Get method. When submitting form data through the Post method, the data is sent to the Web server as the standard data instead of as part of the URL request, which overcomes the disadvantage that the information in the Get method cannot be kept secret and the data amount is too small. Therefore, for security reasons and respect for user privacy, the Post method is usually used for submitting forms.



7.3.7 Content



Statistics show received HTTP response information



As shown in the following figure: you can view



https://reg.163.com/logins.jsp?type=1&url=http://fm163.163.com/coremail/fcg/ntesdoor2?lightweight=1& Verifycookie=1&language=-1&style=-1



Page Response specific content:



8.3.8 Stream



Displays the data sent by the client, and then the data returned by the server side



Client sends total data: 901 Bytes sent to 218.107.55.86:80



Client receives total data from server end: 247 Bytes received by 192.168.52.188.10720



The following is an example of requesting a logo icon in a mail.163.com:



Http://mimg.163.com/logo/163logo.gif



Left: client sends data stream to server side



1 Get/logo/163logo.gif http/1.1



In the above code, "get" represents the request method, "Closea_d.js" represents the URI, and "http/1.1 represents the version of the Protocol and Protocol."



2 Accept: * * means all



3 referer:http://g1a114.mail.163.com/a/f/js3/0712240954/index_v6.htm



Contains a URL that the user accesses the page of the current request from the page represented by the URL



4 ACCEPT-LANGUAGE:ZH-CN



A language that represents an acceptable return to data



5 Accept-encoding:gzip, deflate



Accept-encoding indicates the type of content encoding that the browser can accept in addition to plain text, such as gzip compression or deflate compressed content.



6 user-agent:mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1. NET CLR 1.1.4322;. NET CLR 2.0.50727)



Client Identity Browser type



7 host:mimg.163.com



Access address host identity address



8 connection:keep-alive



Keep the TCP connection (the front desk has a note, no instructions here)



9cookie:vjuids=-1b9063da8.1173d33f879.0.9aab8b85a459d; vjlast=1199406314; _ntes_nnid=a1e69963f40453af8a9ad171cc4cd8da,0|tech|; ntes_ufc=3000000100000000000000000000000000000000000000000000000000000000; province=021;



city=021; Ntes_mail_firstpage=normal; Ntes_sess=68luouh9ewccbfyn5oxz_0qf._



Iomckfscagyrooxpjtvf7r8vx7jazg7hgdwo00gqen1zmrzcx7fmaxnb052r8xofzzyk.hn;



netease_ssn=mayingbao2002; netease_adv=11&23&1199409658752;



Coremail=vdeamrrrdfata%xcvwjixxsrlslkblhzxxzgqpjkexfknt; Wmsvr_domain=g1a114.mail.163.com



Cookies have nothing to say, the previous list



Right: Server-side return data stream to client



1 http/1.0 304 Not Modified



The server tells the customer that the previously buffered document can continue to be used.



2 Date:mon, Dec 2007 21:42:27 GMT



Date the HTTP message was sent



3 Content-type:image/gif



Server return request type is Image/gif



4 expires:wed, 2008 21:42:27 GMT



Specify the validity period of an entity



5 last-modified:wed, APR 2006 03:46:16 GMT



Specify the date and time when the requested resource was last modified



6 age:5607



Represents the cached time after HTTP received a response to a request operation



7 X-cache:from mimg68.nets.com



Indicates that your HTTP request was returned by proxy server.



8 connection:keep-alive



Maintain TCP Request Connection status



9.3.9 HttpWatch Request Information box



The menu area looks like the red box above:



Started: Indicates a URL time to start a record request



Time: Indicates how long it takes to record requests



Sent: Indicates that the client sends the requested byte size to the server side



Reveived: Indicates that the client received a service-side send request byte size



Method: Represents the request URL way



Result: Indicates that the server returned to the client results



The following is a list of HTTP status codes in HttpWatch


200 Ok/success Status Code
302 Moved temporarily status code
304 Not modified status code
401 Access denied status code
404 Page or File not found
Aborted Internet Explorer aborted the HTTP request before a response was received
(Cache) Content read from cache without sending a HTTP request to the server
Error_* An error occurred such as Error_internet_name_not_resolved
2xx Successful HTTP status code
3xx Redirection HTTP Status Code
4xx Client Error HTTP Status code
5xx Server Error HTTP Status code


Detailed HTTP status query, you can refer to this


State code Status information Meaning
100 Continue The initial request has been accepted and the customer should continue to send the remainder of the request. (HTTP 1.1 new)
101 Switching protocols The server converts the request to a different protocol (HTTP 1.1 new)
200 Ok Everything is fine, and the answer document for Get and post requests follows.
201 Created The server has created the document, and the location header gives its URL.
202 Accepted The request has been accepted, but processing has not been completed.
203 Non-authoritative Information The document has returned normally, but some of the answer headers may be incorrect because a copy of the document is being used (HTTP 1.1 is new).
204 No Content The browser should continue to display the original document without a new document. This status code is useful if the user periodically refreshes the page and the servlet can determine that the user's document is new enough.
205 Reset Content There is no new content, but the browser should reset what it displays. Used to force the browser to clear form input (HTTP 1.1 new).
206 Partial Content The customer sent a GET request with a range header, and the server completed it (HTTP 1.1 new).
300 Multiple choices The documents requested by the client can be found in multiple locations, which are already listed in the returned document. If the server wants to make a preference, it should be indicated in the location answer header.
301 Moved Permanently The client requests a document elsewhere, the new URL is given in the location header, and the browser should automatically access the new URL.
302 Found Similar to 301, but the new URL should be considered temporary instead of permanent. Note that the corresponding state information in the HTTP1.0 is "moved temporatily".
When this status code appears, the browser can automatically access the new URL, so it is a useful status code.
Note that this status code can sometimes be replaced with 301. For example, if the browser incorrectly requests Http://host/~user (a trailing slash is missing), some servers return 301, and some return 302.
Strictly speaking, we can only assume that the browser will automatically redirect only if the original request is get. Please see 307.
303 Other Similar to 301/302, the difference is that if the original request was post,location headers the redirected target document specified should be fetched via get (HTTP 1.1 new).
304 Not Modified The client has a buffered document and makes a conditional request (typically providing a if-modified-since header that indicates that the customer wants to update only a document that is newer than the specified date). The server tells the customer that the previously buffered document can continue to be used.
305 Use Proxy The document requested by the customer should be extracted via the proxy server indicated by the location header (HTTP 1.1 new).
307 Temporary Redirect Same as 302 (Found). Many browsers

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.