“21天好习惯” 第一期-9

2. The HTTP CONDITIONAL GET/response interaction

2.1.Inspect the contents of the first HTTP GET request from your browser to the server. Do you see an “IF-MODIFIED-SINCE” line in the HTTP GET?

If-modified-since is not seen because this is the first time the browser has requested this interface

 

2.2.Inspect the contents of the server response. Did the server explicitly return the contents of the file? How can you tell?

 The server explicitly return the contents of the file.

 

2.3. Now inspect the contents of the second HTTP GET request from your browser to the server. Do you see an “IF-MODIFIED-SINCE:” line in the HTTP GET? If so, what information follows the “IF-MODIFIED-SINCE:” header?

What is the information after the "if modified-since:" title:If-Modified-Since: Tue, 21 Sep 2021 05:59:01 GMT\r\n

 

 

2.4. What is the HTTP status code and phrase returned from the server in response to this second HTTP GET? Did the server explicitly return the contents of the file? Explain.

The HTTP status code and phrase returned by the second HTTP get are: http / 1.1 304 not modified. There is no explicit returned content. Because the browser saves the web page content to the cache at the first request, the web page content can be obtained directly from the local cache.

 

3、Retrieving Long Documents

3.1.How many HTTP GET request messages did your browser send? Which packet number in the trace contains the GET message for the Bill or Rights?

 

The browser sent an HTTP get request message once.

Line based text data: text / HTML (98 lines) packet in tracking contains get message of Bill or rights.

 

3.2.Which packet number in the trace contains the status code and phrase associated with the response to the HTTP GET request?

 

Packet: http seven hundred and fifteen HTTP/1.1 200 OK (text/html)

Contains the status associated with the HTTP get request response: 200

Contains the phrase associated with the HTTP get request response: OK

3.3. What is the status code and phrase in the response?

200: indicates that the request has been successful, that the server has processed the request, and that the server has returned the corresponding page.

3.4.How many data-containing TCP segments were needed to carry the single HTTP response and the text of the Bill of Rights?

 

3 TCP protocols

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值