[ZCM] [ZC] 564/ 3 Comment "Content-length of HEAD responses should be based on *parsed* content"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin@zope.org
Fri, 20 Dec 2002 19:24:42 -0500


Issue #564 Update (Comment) "Content-length of HEAD responses should be based on *parsed* content"
 Status Pending, Zope/bug medium
To followup, visit:
  http://collector.zope.org/Zope/564

==============================================================
= Comment - Entry #3 by mjablonski on Dec 20, 2002 7:24 pm

Uuppps... sorry, I didn't noticed the "HEAD"-Request. Zope2.6 returns still the wrong content-length for HEAD-Requests.
________________________________________
= Comment - Entry #2 by mjablonski on Dec 20, 2002 7:14 pm

I've tested the described problem against 2.6. The content-length is correct. I propose to close this issue.
________________________________________
= Request - Entry #1 by wilm on Sep 10, 2002 10:02 am

In responses to HTTP "HEAD" requests, the 'Content-length' header should be set to the length of the data that would be returned if the "HEAD" were a "GET". (rfc 2616, p 9.4)

For Zope, this means it should be set to the length of the object if it were published.

Instead of doing that, Zope sets it to the length of the source of the object.

Example: if a ZPT contains
 <div tal:replace="structure request" />
the content-length reported in the header is 39 instead of, say, 2802.
==============================================================