计算机网络实验HTTP.docx
《计算机网络实验HTTP.docx》由会员分享,可在线阅读,更多相关《计算机网络实验HTTP.docx(8页珍藏版)》请在冰豆网上搜索。
![计算机网络实验HTTP.docx](https://file1.bdocx.com/fileroot1/2022-11/24/be55ccd4-168d-42bf-9b2b-d314ac3675fc/be55ccd4-168d-42bf-9b2b-d314ac3675fc1.gif)
计算机网络实验HTTP
1.TheBasicHTTPGET/responseinteraction
1.IsyourbrowserrunningHTTPversion1.0or1.1?
WhatversionofHTTPisthe
serverrunning?
答:
是的,是1.1版。
2.Whatlanguages(ifany)doesyourbrowserindicatethatitcanaccepttothe
server?
答:
Accept-Language:
zh-CN,说明用户想得到该对象的中文版本。
3.WhatistheIPaddressofyourcomputer?
Ofthegaia.cs.umass.eduserver?
答:
我电脑的IP地址是10.2.136.16,服务器的地址是128.119.245.12。
4.Whatisthestatuscodereturnedfromtheservertoyourbrowser?
答:
状态码为:
HTTP/1.12000K。
5.WhenwastheHTMLfilethatyouareretrievinglastmodifiedattheserver?
答:
Last-Modified:
Tue,13Sep201112:
31:
01GMT。
6.Howmanybytesofcontentarebeingreturnedtoyourbrowser?
答:
Content-Length:
128。
7.Byinspectingtherawdatainthepacketcontentwindow,doyouseeanyheaders
withinthedatathatarenotdisplayedinthepacket-listingwindow?
Ifso,name
one.
答:
在原始资料里,并不是所有的标题都可以被发现。
2.TheHTTPCONDITIONALGET/responseinteraction
8.InspectthecontentsofthefirstHTTPGETrequestfromyourbrowsertothe
server.Doyouseean“IF-MODIFIED-SINCE”lineintheHTTPGET?
答:
如截图所示,没看见有这一行。
9.Inspectthecontentsoftheserverresponse.Didtheserverexplicitlyreturnthe
contentsofthefile?
Howcanyoutell?
答:
是的,我们可以在Line-basedtextdata栏看见返回的text文件内容。
10.NowinspectthecontentsofthesecondHTTPGETrequestfromyourbrowserto
theserver.Doyouseean“IF-MODIFIED-SINCE:
”lineintheHTTPGET?
If
so,whatinformationfollowsthe“IF-MODIFIED-SINCE:
”header?
答:
是的,If-Modified-Since:
Tue,13Sep201113:
25:
01GMT。
11.WhatistheHTTPstatuscodeandphrasereturnedfromtheserverinresponseto
thissecondHTTPGET?
Didtheserverexplicitlyreturnthecontentsofthefile?
Explain.
答:
返回的状态码和相应状态信息是:
304notmodified;服务器没有明确的返回所请求对象的内容,因为是缓存器通过使用该对象,而向浏览器转发的该对象的拷贝。
3.RetrievingLongDocuments
12.HowmanyHTTPGETrequestmessagesweresentbyyourbrowser?
答:
有4个HTTPGET请求信息。
13.Howmanydata-containingTCPsegmentswereneededtocarrythesingleHTTP
response?
答:
需要4个data-containingTCPsegments,分别是1460,1460,1460,423字节,总共4803字节。
14.WhatisthestatuscodeandphraseassociatedwiththeresponsetotheHTTPGET
request?
答:
状态码和相应状态信息是:
200OK。
15.ArethereanyHTTPstatuslinesinthetransmitteddataassociatedwithaTCP-induced“Continuation”?
答;没有。
4.HTMLDocumentswithEmbeddedObjects
16.HowmanyHTTPGETrequestmessagesweresentbyyourbrowser?
Towhich
InternetaddressesweretheseGETrequestssent?
答:
有4个HTTPGET请求,Internetaddresses分别是:
128.119.245.12,165.193.140.14,128.119.240.90,128.119.245.12
17.Canyoutellwhetheryourbrowserdownloadedthetwoimagesserially,or
whethertheyweredownloadedfromthetwowebsitesinparallel?
Explain.
答:
串行,因为在两个请求的响应消息中,端口号是不同的。
5HTTPAuthentication
18.Whatistheserver’sresponse(statuscodeandphrase)inresponsetotheinitial
HTTPGETmessagefromyourbrowser?
答:
状态码和相应状态信息是:
401AuthorizationRequired。
19.Whenyourbrowser’ssendstheHTTPGETmessageforthesecondtime,what
newfieldisincludedintheHTTPGETmessage?
答:
Thenewfield是Authorization:
BasicZXRoLXN0dWRlbnRzOm5ldHdvcmtz\r\n。