aboutsummaryrefslogtreecommitdiff
path: root/rpki/http.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2015-10-19 03:36:42 +0000
committerRob Austein <sra@hactrn.net>2015-10-19 03:36:42 +0000
commit7f5e75188ad4527e3c3425a155dfed0847a389dd (patch)
tree400301cae01f51141e380664cf0b382b8204a00d /rpki/http.py
parent7ab6040f7eb05a7ac4424e0294d228256e9a64dd (diff)
Amputate old SQL code out of rpkid with a fire axe, replacing it with
Django ORM. Duct tape and bailing wire everywhere, much clean-up left to do, but basic "make yamltest" suite runs. Much of the clean-up isn't worth doing until after revamping the I/O system, as it'll all change again at that point anyway. svn path=/branches/tk705/; revision=6127
Diffstat (limited to 'rpki/http.py')
-rw-r--r--rpki/http.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/rpki/http.py b/rpki/http.py
index 16ed0453..b991eeb0 100644
--- a/rpki/http.py
+++ b/rpki/http.py
@@ -186,15 +186,20 @@ class http_message(object):
Format an outgoing HTTP message.
"""
- s = self.format_first_line()
+ s = str(self.format_first_line())
+ assert isinstance(s, str)
if self.body is not None:
assert isinstance(self.body, str)
self.headers["Content-Length"] = len(self.body)
for kv in self.headers.iteritems():
- s += "%s: %s\r\n" % kv
+ h = str("%s: %s\r\n" % kv)
+ assert isinstance(h, str)
+ s += h
s += "\r\n"
+ assert isinstance(s, str)
if self.body is not None:
s += self.body
+ assert isinstance(s, str)
return s
def __str__(self):