[Zope] problem wrapping class Image!

dharmadude@inwind.it dharmadude@inwind.it
Mon, 29 Oct 2001 00:32:51 +0100 (CET)


Hi zopers!! I want to wrap the class Image (to check if the user has the
permission to see the image) , but for some reason it doesn't work, and it
doesn't send the image :-(

what I do is very simple:

class SImage(Image.Image, SFunctions.BaseClass):
    "SImage object"
    meta_type='SImage'

    def index_html(self, REQUEST, RESPONSE):
        """Redefine index to check for permission"""
        #self.Start()
        Image.Image.index_html(self, REQUEST, RESPONSE)


the line self.Start() checks for permissions, I commented it
out to make sure that wasn't the problem.

so basically I just call the superclass index_html, like
it's done in my Python book!, but it doesn't work.

Mozilla shows the image url instead of the image, and
wget tells me:


/tmp> wget http://zopesite/trad/secret/aaa
--19:13:04--  http://zopesite/trad/secret/aaa
           => `aaa.6'
Connecting to zopesite:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: 23,444 [image/jpeg]

    0K                                                         0% @   0.00
B/s

19:13:04 (0.00 B/s) - Connection closed at byte 0. Retrying.


... and keeps trying with no result :-(



if I get rid of the index_html method it works fine,
so that's the problem.

Can anybody help me?

Thanks in advance

(-: