aboutsummaryrefslogtreecommitdiff
path: root/rpkid/rpki/http.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2011-03-18 03:51:12 +0000
committerRob Austein <sra@hactrn.net>2011-03-18 03:51:12 +0000
commit42b211b6aa4aff2c233aa5a6fe30f231a423e068 (patch)
treef137b4bbbe1dc73696211a03c38b270b015520fa /rpkid/rpki/http.py
parent94b7b05f1104c2350b41d63c09f35bde0f0a0b83 (diff)
Add @property decorators to a bunch of methods that are just syntactic
sugar around cached SQL object fetches. Checkpoint of incomplete support for Ghostbusters reords. Clean up a few extraneous imports. svn path=/rpkid/Makefile.in; revision=3725
Diffstat (limited to 'rpkid/rpki/http.py')
-rw-r--r--rpkid/rpki/http.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/rpkid/rpki/http.py b/rpkid/rpki/http.py
index 042542b2..90b8c758 100644
--- a/rpkid/rpki/http.py
+++ b/rpkid/rpki/http.py
@@ -3,7 +3,7 @@ HTTP utilities, both client and server.
$Id$
-Copyright (C) 2009-2010 Internet Systems Consortium ("ISC")
+Copyright (C) 2009-2011 Internet Systems Consortium ("ISC")
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -198,6 +198,7 @@ class http_message(object):
raise rpki.exceptions.HTTPBadVersion, "Couldn't parse version %s" % version
self.version = tuple(int(i) for i in version[5:].split("."))
+ @property
def persistent(self):
"""
Figure out whether this HTTP message encourages a persistent connection.
@@ -492,7 +493,7 @@ class http_server(http_stream):
pass the message body, path, and a reply callback to the handler.
"""
self.log("Received request %s %s" % (self.msg.cmd, self.msg.path))
- if not self.msg.persistent():
+ if not self.msg.persistent:
self.expect_close = True
handler = self.find_handler(self.msg.path)
error = None
@@ -717,7 +718,7 @@ class http_client(http_stream):
self.log("Message received, state %s" % self.state)
- if not self.msg.persistent():
+ if not self.msg.persistent:
self.expect_close = True
if self.state != "request-sent":