关闭→
当前位置:尚之范>生活>心理>http中的head与body怎么组成的

http中的head与body怎么组成的

尚之范 人气:1.47W
http中的head与body怎么组成的

Http协议中的Header与Body

Header的每行最后要加rn

Header与Body之间要用rn隔开

Body后无需加rn

ACSII码中

'n' 10 换行

'r' 13 回车

也可以表示为'x0a'和'x0d'.(16进制)

示例:HTTP开始部分为header,<html>部分为body。

HTTP/1.1 200 OKrn

Content-Encoding: gziprn

Content-Type: text/xmlrn

Content-Length: 399rn

Connection: keep-alivern

X-Varnish-Cache: HITrn

X-Varnish-Cache-Hits: 1241rn

rn

<html.....</html>

TAG标签:#http #HEAD #body #