惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

PCI Perspectives
PCI Perspectives
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Palo Alto Networks Blog
S
Schneier on Security
Scott Helme
Scott Helme
T
Threat Research - Cisco Blogs
K
Kaspersky official blog
Microsoft Azure Blog
Microsoft Azure Blog
T
The Exploit Database - CXSecurity.com
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tenable Blog
G
GRAHAM CLULEY
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
I
Intezer
D
Docker
月光博客
月光博客
L
Lohrmann on Cybersecurity
Latest news
Latest news
B
Blog
罗磊的独立博客
M
MIT News - Artificial intelligence
S
Securelist
Know Your Adversary
Know Your Adversary
Help Net Security
Help Net Security
Recorded Future
Recorded Future
S
SegmentFault 最新的问题
N
Netflix TechBlog - Medium
T
Threatpost
H
Hacker News: Front Page
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
人人都是产品经理
人人都是产品经理
F
Fortinet All Blogs
博客园 - Franky
P
Proofpoint News Feed
大猫的无限游戏
大猫的无限游戏
Blog — PlanetScale
Blog — PlanetScale
有赞技术团队
有赞技术团队
博客园 - 【当耐特】
A
About on SuperTechFans
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
Tor Project blog
Google Online Security Blog
Google Online Security Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Engineering at Meta
Engineering at Meta
Webroot Blog
Webroot Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
Microsoft Security Blog
Microsoft Security Blog

博客园 - xwy.net

玩转ubuntu8.04,记录下碰到的问题,及解决 解决div里放table自适应的问题 temp - xwy.net - 博客园 hibernate annotation+spring 级联更新问题解决 sitemesh,html乱码问题解决不了,难道一定要用jsp - xwy.net - 博客园 注意啦,Struts 2.1.6跟sitemesh-2.4.1不兼容 struts2+freemarker+sitemesh乱码,解决了 firefox3关闭缓存的办法 jQuery.Autocomplete(新版本)自动完成插件在中文应用时的BUG修正 - xwy.net - 博客园 搞定URL中文编码 - xwy.net - 博客园 cxfc采用UsernameToken时的PasswordDigest问题 centos5.1远程升级ssh到5.0p1 asm冲突的问题,找了半天 莫名其妙的网络问题,原来是KB951748惹得祸 RHCS环境中oracle监听的问题 解决jasperreport生成html分页和打印问题 自制百香果汁(图) svn的RA layer request failed问题 MySQL的AUTO_INCREMENT
关于Content-Length
xwy.net · 2008-09-16 · via 博客园 - xwy.net

1.当客户端请求时是Connection: keep-alive的时候,服务器返回的形式Transfer-Encoding: chunked的形式,以确保页面数据是否结束,长连接就是这种方式,用chunked形式就不能用content-length
参考:
设置响应消息的实体内容的大小,单位为字节。对于HTTP协议来说,这个方法就是设置 Content-Length响应头字段的值。因为当浏览器与WEB服务器之间使用持久(keep-alive)的HTTP连接,如果WEB服务器没有采用chunked传输编码方式,那么它必须在每一个应答中发送一个 Content-Length的响应头来表示各个实体内容的长度,以便客户端能够分辨出上一个响应内容的结束位置。一般来说,Servlet程序不必调用 setContentLength方法来设置Content-Length头字段,因为Servlet引擎在向客户端实际输出响应内容时,它可以自动设置 Content-Length头字段或采用chunked传输编码方式。
http://hi.baidu.com/zkheartboy/blog/item/9216a0fd05591e1508244d74.html

2.当不是keep-alive,就是常用短连接形式,会直接把连接关掉,不需要长度

3. 服务器上取得是动态内容,所有没有content-length这项
如果是静态页面,则有