Hello, today I found an interesting problem. When I make a HEAD request to Zope the answer is something not really expected. The Content-type is wrong. I include two transcipts of my server responses below. please note that the HEAD request return "Content-Type: application/octet-stream" instead of the correct "Content-tYpe: text/html" which is returned with a GET request. Regards Ulrich -------------------- FIRST TRANSCRIPT # > telnet test 80 Trying 192.168.0.5... Connected to test. Escape character is '^]'. HEAD / HTTP/1.1 Host: test HTTP/1.0 200 OK Server: Zope/(Zope 2.5.1 (binary release, python 2.1, linux2-x86), python 2.1.3, linux2) ZServer/1.1b1 Date: Tue, 24 Sep 2002 19:01:47 GMT Content-Length: 0 Ms-Author-Via: DAV Content-Type: application/octet-stream Accept-Ranges: none Last-Modified: Tue, 24 Sep 2002 18:45:34 GMT Via: 1.0 test Connection closed by foreign host. ---------------------- SECOND TRANSCRIPT # > telnet test 80 Trying 192.168.0.5... Connected to test. Escape character is '^]'. GET / HTTP/1.1 Host: test HTTP/1.0 200 OK Server: Zope/(Zope 2.5.1 (binary release, python 2.1, linux2-x86), python 2.1.3, linux2) ZServer/1.1b1 Date: Tue, 24 Sep 2002 19:00:32 GMT Content-Type: text/html Content-Length: 6579 Via: 1.0 test.entenhausen [... lot's of content delete] -- World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06
Ulrich Wisser wrote:
today I found an interesting problem. When I make a HEAD request to Zope the answer is something not really expected. The Content-type is wrong.
Search the archives, this has been discussed many many times before. The thinking goes that to compute the correct content type (and length!) would mean rendering the URL as if a GET request had been made, and would probably be too expensive. Hence HEAD returns dummy values. This means Zope fails to comply with a number of RFCs, and it can be a headache but no-one is finding this itch sufficiently irritating to scratch :-( Fancy doing some Zope development work? ;-) cheers, Chris
participants (2)
-
Chris Withers -
Ulrich Wisser