🐛 fix header assignment bug
This commit is contained in:
parent
65dfa9d599
commit
1cc99412bc
@ -29,8 +29,10 @@ class HttpResponse:
|
||||
self.data = data
|
||||
self.context = context if context else {}
|
||||
self.status_code = status_code
|
||||
self.headers = headers if headers else {}
|
||||
self.headers = Headers(**{k.lower(): v for k, v in self.headers.items()})
|
||||
self._headers = headers if headers else {}
|
||||
self.headers = Headers()
|
||||
for k, v in self._headers.items():
|
||||
self.headers[k.lower()] = v
|
||||
if not self.headers.get("content-type"):
|
||||
self.headers["content-type"] = "text/html; charset=utf-8"
|
||||
self.headers["server"] = "Spiderweb"
|
||||
|
Loading…
Reference in New Issue
Block a user