[zorp-hu] http hiba?
Kosa Attila
atkosa@shinwa.hu
Wed, 4 Apr 2001 13:08:41 +0200
On Wed, Apr 04, 2001 at 09:57:29AM +0200, Balazs Scheidler wrote:
>
> class MyHttp(HttpProxy):
> def config(self):
> HttpProxy.config(self)
> self.request["GET"] = (Http.HTTP_POLICY, self.checkClient)
> self.request["POST"] = (Http.HTTP_POLICY, self.checkClient)
> self.request["HEAD"] = (Http.HTTP_POLICY, self.checkClient)
> self.allowed_clients = { "192.168.1.5":1, "192.168.1.7":1 }
Ugyanezt irtam be, csak a kliens sort javitottam erre:
{ "192.168.0.210":1 }
> def checkClient(self, method, url, version):
> try:
> if self.allowed_clients[self.session.client_address.ip_s]:
> return Z_ACCEPT
> except KeyError:
> pass
> return Z_DENY
Ez is ugyanaz, es a kovetkezot kaptam:
except KeyError:
^
SyntaxError: invalid syntax
--
Udvozlettel
Zsiga