加入收藏
举报
当前仅显示指定条件回帖 [ 展开查看全部 ]
02-07 19:42
#
文件名称:
11.6.md
所在目录:
深入了解计算机系统(CSAPP) / csapp课后题答案 / chapter11
文件大小:
2.48 KB
下载地址:
richardodliu/HIT-Courses
   
免责声明:本网站仅提供指向 GitHub 上的文件的链接,所有文件的版权归原作者所有,本网站不对文件内容的合法性、准确性或安全性承担任何责任。
文本预览:
11.6
A.
```diff
!INCLUDE "./code/tiny.6.c.diff"
```
B.
`./tiny.6 5000` run server and
firefox visit localhost:5000
```
GET / HTTP/1.1
Host: localhost:5000
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
```
C.
HTTP 1.1
D.
visit [rfc](https://www.rfc-editor.org/rfc/rfc2616.pdf)
section 14 Header Field Definitions
Accept: 14.1
The Accept request-header field can be used to specify certain media types which are acceptable for the response.
Accept headers can be used to indicate that the request is specifically limited to a small set of desired types, as in
the case of a request for an in-line image.
Accept-Encoding: 14.3
The Accept-Encoding request-header field is similar to Accept, but restricts the content-codings
that are acceptable in the response.
Accept-Language: 14.4
The Accept-Language request-header field is similar to Accept, but restricts the set of natural languages that
are preferred as a response to the request. Language tags are defined in section 3.10.
Connection: 14.10
The Connection general-header field allows the sender to specify options that are desired for that particular
connection and MUST NOT be communicated by proxies over further connections.
Host: 14.23
The Host request-header field specifies the Internet host and port number of the resource being requested, as
obtained from the original URI given by the user or referring resource.
The Host field value MUST represent the naming authority of the origin server or gateway given by
the original URL. This allows the origin server or gateway to differentiate between internally-ambiguous URLs, such
as the root “/” URL of a server for multiple host names on a single IP address.
User-Agent: 14.43
The User-Agent request-header field contains information about the user agent originating the request. This is for
statistical purposes, the tracing of protocol violations, and automated recognition of user agents for the sake of
tailoring responses to avoid particular user agent limitations. User agents SHOULD include this field with requests.
The field can contain multiple product tokens (section 3.8) and comments identifying the agent and any subproducts
which form a significant part of the user agent. By convention, the product tokens are listed in order of their
significance for identifying the application.
点赞 回复
回帖
支持markdown部分语法 ?