Dolda2000 GitWeb
/
wrw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c4dcf7
)
Add Content-Length to SP responses.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 15 Sep 2013 23:10:23 +0000
(
01:10
+0200)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 15 Sep 2013 23:10:23 +0000
(
01:10
+0200)
wrw/sp/util.py
patch
|
blob
|
blame
|
history
diff --git
a/wrw/sp/util.py
b/wrw/sp/util.py
index
3ea7a8a
..
e15b947
100644
(file)
--- a/
wrw/sp/util.py
+++ b/
wrw/sp/util.py
@@
-234,5
+234,7
@@
class response(dispatch.restart):
raise Exception("a subclass of wrw.sp.util.response must override ctype")
def handle(self, req):
+ ret = self.formatter.format(self.root, doctype=self.doctype, charset=self.charset)
req.ohead["Content-Type"] = self.ctype
- return [self.formatter.format(self.root, doctype=self.doctype, charset=self.charset)]
+ req.ohead["Content-Length"] = len(ret)
+ return [ret]