Jeff Hoffman writes:
 > ....
 > In the index_html method, I have:
 >   RESPONSE.setHeader('Content-Type', 'video/foo')
 >   RESPONSE.setHeader('Content-Length', 1212)
 > ....
 > However, when I telnet to my web port and do:
 >   HEAD /path/to/myfile.mpg HTTP/1.0
 > I get:
 >   Content-Type: video/mpeg
 >   Content-Length: 0

The problem is, that a HEAD request does not execute
Instead, the "HEAD" method from "webdav.Resource" is
It uses a "content_type" and "get_size" attribute/method
to set the "Content-Type" and "Content-Length" HTTP header.
If there is no "content_type" attribute/method, the
content type is guessed (via "mimetypes.guess_type").
If there is no "get_size", the "Content-Length" is 0.


Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to