Mercurial Hosting > luan
comparison src/luan/modules/http/impl/Http.luan @ 1165:668f29bc52ea
clean up content-type
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 07 Feb 2018 23:16:12 -0700 |
parents | 1f9d34a6f308 |
children | 7ef40e1923b7 |
comparison
equal
deleted
inserted
replaced
1164:1f9d34a6f308 | 1165:668f29bc52ea |
---|---|
84 | 84 |
85 function this.send_error(status,msg) | 85 function this.send_error(status,msg) |
86 this.reset() | 86 this.reset() |
87 this.status = status | 87 this.status = status |
88 if msg ~= nil then | 88 if msg ~= nil then |
89 this.headers["content-type"] = "text/plain" | 89 this.headers["content-type"] = "text/plain; charset=utf-8" |
90 local writer = this.text_writer() | 90 local writer = this.text_writer() |
91 writer.write(msg) | 91 writer.write(msg) |
92 end | 92 end |
93 end | 93 end |
94 | 94 |