Lecture7TELNETProtocolHyperTextTransferProtocol.ppt

  1. 1、本文档共47页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Lecture7TELNETProtocolamp;HyperTextTransferProtocol.ppt

Example GET Request GET /~mgunes/cpe401/lab1.htm HTTP/1.1 Accept: */* Host: User-Agent: Internet Explorer From: mgunes@ Referer: / There is a blank line here! HTTP * HTTP Response ASCII Status Line Headers Section Content can be anything (not just text) typically an HTML document or some kind of image. Status-Line Headers . . . Content... blank line HTTP * Response Status Line HTTP-Version Status-Code Message Status Code is 3 digit number (for computers) 1xx Informational 2xx Success 3xx Redirection 4xx Client Error 5xx Server Error Message is text (for humans) HTTP * Example Status Lines HTTP/1.0 200 OK HTTP/1.0 301 Moved Permanently HTTP/1.0 400 Bad Request HTTP/1.0 500 Internal Server Error HTTP * Response Headers Provide the client with information about the returned entity (document). what kind of document how big the document is how the document is encoded when the document was last modified Response headers end with blank line HTTP * Response Header Examples Date: Wed, 30 Jan 2002 12:48:17 EST Server: Apache/1.17 Content-Type: text/html Content-Length: 1756 Content-Encoding: gzip HTTP * Content Content can be anything (sequence of raw bytes). Content-Length header is required for any response that includes content. Content-Type header also required. HTTP * Single Request/Reply The client sends a complete request. The server sends back the entire reply. The server closes it’s socket. If the client needs another document it must open a new connection. This was the default for HTTP 1.0 HTTP * Persistent Connections HTTP 1.1 supports persistent connections (this is the default). Multiple requests can be handled over a single TCP connection. The Connection: header is used to exchange information about persistence (HTTP/1.1) 1.0 Clients used a Keep-alive: header HTTP * Try it with telnet telnet 80 GET / HTTP/1.0 HTTP/1.0 200 OK Server: Apache ... Response Request-line Blank Line (end of headers) HTTP * Try it with telnet (persistent) tel

文档评论(0)

tangtianxu1 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档