Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (2)
Also set Content-Length for HTMLResult
· 4f71a227
Julien Cristau
authored
Jul 06, 2018
4f71a227
Merge branch 'jcristau/security-tracker-content-length'
· 0670207f
Salvatore Bonaccorso
authored
Jul 06, 2018
0670207f
Show whitespace changes
Inline
Side-by-side
lib/python/web_support.py
View file @
0670207f
...
...
@@ -661,6 +661,7 @@ class HTMLResult(Result):
buf
.
write
(
'
\n
'
)
self
.
contents
.
flatten
(
buf
.
write
)
buf
=
buf
.
getvalue
()
self
.
headers
[
'
Content-Length
'
]
=
str
(
len
(
buf
))
def
later
(
req
):
headers_later
(
req
)
req
.
wfile
.
write
(
buf
)
...
...