Incorrect content-type returned by ZServer
I have a Zope 2.0.1 application that is working pretty well except that one page is given the wrong content-type by ZServer. The page in question is a DTML document with CGI parameters. I wrote a debugging application in Java to trap the input and output between the browser and the server. Here is a log from a successful transaction: 3>GET /test/QOR/TestCasePage?testcase=ct&days=14 HTTP/1.0 3>Referer: http://pc3-10:9099/test/QOR 3>Connection: Keep-Alive 3>User-Agent: Mozilla/4.7 [en] (WinNT; U) 3>Host: pc3-10:9099 3>Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */* 3>Accept-Encoding: gzip 3>Accept-Language: en 3>Accept-Charset: iso-8859-1,*,utf-8 3> 3<HTTP/1.0 200 OK 3<Server: Zope/(unreleased version) ZServer/1.1b1 3<Date: Wed, 01 Dec 1999 18:27:56 GMT 3<Connection: close 3<Content-Type: text/html 3<Content-Length: 11285 3< 3<<HTML> ... The page as expected ... And here is the transaction from the unsuccessful transaction: 4>GET /test/QOR/TestCasePage?testcase=fa&days=14 HTTP/1.0 4>Referer: http://pc3-10:9099/test/QOR 4>Connection: Keep-Alive 4>User-Agent: Mozilla/4.7 [en] (WinNT; U) 4>Host: pc3-10:9099 4>Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */* 4>Accept-Encoding: gzip 4>Accept-Language: en 4>Accept-Charset: iso-8859-1,*,utf-8 4> 4>HTTP/1.0 200 OK 4<Server: Zope/(unreleased version) ZServer/1.1b1 4<Date: Wed, 01 Dec 1999 18:28:05 GMT 4<Connection: close 4<Content-Type: application/octet-stream 4<Content-Length: 19571 4< 4<<HTML> Note that the two pages are exactly the same. The only difference is one CGI argument (testcase). But in the latter transaction, ZServer returns a content type of "application/octet-stream" instead of "text/html". This causes the browser to try to save the file instead of displaying it. Does this ring any bells? Any workarounds? Right now, this problem looks like it is not directly under my control. David S. Harrison (dsh@magma-da.com)
"David S. Harrison" wrote:
I have a Zope 2.0.1 application that is working pretty well except that one page is given the wrong content-type by ZServer. The page in question is a DTML document with CGI parameters. I wrote a debugging application in Java to trap the input and output between the browser and the server. Here is a log from a successful transaction:
Not long after looking closer at this issue, I found the problem. The page with the wrong content type contains some characters that are outside the printable range. It looks like ZServer saw those characters and thought it was an octet stream. The problem appears to be in my page generation. David S. Harrison (dsh@magma-da.com)
"David S. Harrison" wrote:
"David S. Harrison" wrote:
I have a Zope 2.0.1 application that is working pretty well except that one page is given the wrong content-type by ZServer. The page in question is a DTML document with CGI parameters. I wrote a debugging application in Java to trap the input and output between the browser and the server. Here is a log from a successful transaction:
Not long after looking closer at this issue, I found the problem. The page with the wrong content type contains some characters that are outside the printable range. It looks like ZServer saw those characters and thought it was an octet stream. The problem appears to be in my page generation.
I had a problem just the other day when I uploaded some dtml to a dtml method using the latest version of ie from MacOS 8.x. I never figured out what was going on, I just used netscape to upload correctly. The variables were as follows, I was using MacOS 8 (don't ask, it wasn't my fault), MSIE 5.x, and the file was stored on a zip disk in DOS format. One of those things was breaking the upload process. --sam
participants (2)
-
David S. Harrison -
Sam Gendler