--- deliantra/server/ext/tcp_http.ext 2017/01/09 16:23:53 1.15 +++ deliantra/server/ext/tcp_http.ext 2017/01/11 12:10:25 1.16 @@ -43,14 +43,15 @@ . "etag: \"0\"\015\012"; sub content_type($$) { - return "content-type: image/png\015\012" if $_[1] =~ /^\x89PNG/; - return "content-type: image/jpeg\015\012" if $_[1] =~ /^......JFIF/s; - return "content-type: audio/wav\015\012" if $_[1] =~ /^RIFF/; - return "content-type: audio/ogg\015\012" if $_[1] =~ /^OggS/; - return "content-type: text/html\015\012" if $_[1] =~ /^respond ("200 OK", $meta, "content-type: text/plain\015\012" . $cache_headers); + $self->respond ("200 OK", $meta, "content-type: text/plain; charset=utf-8\015\012" . $cache_headers); } else { $self->respond ("404 type $type has no metadata"); } @@ -188,7 +189,7 @@ my $body = join "", @body; utf8::encode $body; - $self->respond ("200 OK", $body, "content-type: text/html\015\012"); + $self->respond ("200 OK", $body, "content-type: text/html; charset=utf-8\015\012"); } else { $self->respond ("404 not found");