HTTP
1. The Basic HTTP GET/response interaction
Q&A
- Is your browser running HTTP version 1.0 or 1.1? What version of HTTP is the server running?
浏览器使用的是HTTP 1.1,因为浏览器发出的GET请求标识了HTTP 1.1协议;服务器使用的也是HTTP 1.1,因为浏览器返回的OK消息标识了HTTP 1.1协议 - What languages (if any) does your browser indicate that it can accept to the server?
在Accept-Language一项中能够看到,接收到服务器的语言是zh-CN,zh,即简体中文 - What is the IP address of your computer? Of the gaia.cs.umass.edu server?
在上方packet-contents window中的Source一栏中可以看到,GET请求标识的本机IP是114.214.185.251,服务器返回的消息标识的服务器IP是128.119.245.12 - What is the status code returned from the server to your browser?
在Info一栏能够看到,服务器返回的状态码是200,表明请求成功且有返回请求的内容 - When was the HTML file that you are retrieving last modified at the server?
在服务器返回的消息中,可以找到"Last-Modified:Sun,22 Sep 2019 05:59:01 GMT",即格林尼治时间2019年9月22日05:59:01,星期日 - How many bytes of content are being returned to your browser?
在返回消息中能够找到,返回的File Data为128Bytes - By inspecting the raw data in the packet content window, do you see any headers within the data that are not displayed in the packet-listing window? If so, name one.
有,例如Content-Length
2. The HTTP CONDITIONAL GET/response interaction
Q&A
- 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?
第一条HTTP GET中没有出现 - Inspect the contents of the server response. Did the server explicitly return the contents of the file? How can you tell?
第一次服务器有显式返回的文件内容,因为第一次的返回消息中明确给出了Content-Type和Content-Length - 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?
第二次HTTP GET中出现了:"If-Modified-Since: Sun, 22 Sep 2019 05:59:01 GMT\r\n" - 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.
服务器返回"304 Not Modified"。而第二次服务器没有显式地返回文件内容,因为在返回消息中未涉及Content信息。缓存中已经存在,服务器不会再返回内容
3. Retrieving Long Documents
Q&A
- How many HTTP GET request messages were sent by your browser?
浏览器发出了一条GET请求 - How many data-containing TCP segments were needed to carry the single HTTP response?
在服务器返回消息的TCP栏中可以看到,共使用了4个Reassembled TCP Segments - What is the status code and phrase associated with the response to the HTTP GET request?
200 OK - Are there any HTTP status lines in the transmitted data associated with a TCP induced “Continuation”?
没有,数据包已经整合所有Segments的内容
4. HTML Documents with Embedded Objects
Q&A
- How many HTTP GET request messages were sent by your browser? To which Internet addresses were these GET requests sent?
浏览器共发出3条GET请求,请求的三条地址均为:128.119.245.12,但三个url不同 - Can you tell whether your browser downloaded the two images serially, or whether they were downloaded from the two web sites in parallel? Explain.
In parallel.两条请求独立地发出,独立地下载图片到本机浏览器。因为在第一条GET请求发出后,在第一张图片返回前,第二条GET请求已经发出去了,说明两个图片的请求下载是独立并行的
5. HTTP Authentication
Q&A
- What is the server’s response (status code and phrase) in response to the initial HTTP GET message from your browser?
401 Unauthorized - When your browser’s sends the HTTP GET message for the second time, what new field is included in the HTTP GET message?
第二次的请求信息中添加了Authorization项:
Authorization: Basic d2lyZXNoYXJrLXN0dWRlbnRzOm5ldHdvcms=\r\n
Credentials: wireshark-students:network