Hi, I'm having some strange problems with a Z Search Interface. With some queries it returns wrong content-type (octect-stream instead of text/html). How can I fix this? Where is the problem: dtml-code sligth modified by me (most aestetical changes) or sql data returned by MySQL? The problem is reproductible: whenever I try some keywords, I get a download prompt instead a html rendered page. Thanks, []s, Mario ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/
On Tue, 4 Jan 2000 menezes@curiango.ipen.br wrote:
Hi,
I'm having some strange problems with a Z Search Interface. With some queries it returns wrong content-type (octect-stream instead of text/html). How can I fix this? Where is the problem: dtml-code sligth modified by me (most aestetical changes) or sql data returned by MySQL? The problem is reproductible: whenever I try some keywords, I get a download prompt instead a html rendered page.
I had the same problem. Using the source I managed to track down the source of the error to a piece of code that guesses the MIME type of the document. Relevant files in the source are OFS/DTMLDocument/Method.py and OFS/content_types.py Basically what appears to happen is that some SQL queries return what is considered bianry data by Zope resulting in a page that isn't visble to the user if they are running certain browsers. Looking at the code in DTMLMethod.py it appears that you can override the mime type by setting RESPONSE.headers['content-type'] to 'text/html' but I haven't tried this (though I am glad I looked now). This was really confusing when I first encountered it though. While I appreciate it automatically guessing mime types it should maybe be a bit more forgiving somehow. Anyway, I hope this helps. -j. ------- Jordan B. Baker -- jbb@spyderlab.com weaving the web @ http://www.spyderlab.com
Quoting "Jordan B. Baker" <jbb@spyderlab.com>:
I had the same problem. Using the source I managed to track down the source of the error to a piece of code that guesses the MIME type of the document.
Relevant files in the source are OFS/DTMLDocument/Method.py and OFS/content_types.py
Basically what appears to happen is that some SQL queries return what is considered bianry data by Zope resulting in a page that isn't visble to the user if they are running certain browsers.
yes! I found the bad data in the sql table. I'm just curious why the test page of z search interface just showed all the bad data and my page didn't. :-( thanks, []s, Mário O. de Menezes ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/
participants (2)
-
Jordan B. Baker -
menezes@curiango.ipen.br