1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vweb: add more tests. Fix missing Content-Length: header bug on 404.

This commit is contained in:
Delyan Angelov
2020-08-14 02:43:57 +03:00
parent 3640bd2fda
commit 2ad2b4c5ba
3 changed files with 109 additions and 3 deletions

View File

@@ -16,7 +16,7 @@ pub const (
header_server = 'Server: VWeb\r\n'
header_connection_close = 'Connection: close\r\n'
headers_close = '${header_server}${header_connection_close}\r\n'
http_404 = 'HTTP/1.1 404 Not Found\r\nContent-Type: text/plain\r\n${headers_close}404 Not Found'
http_404 = 'HTTP/1.1 404 Not Found\r\nContent-Type: text/plain\r\nContent-Length: 13\r\n${headers_close}404 Not Found'
http_500 = 'HTTP/1.1 500 Internal Server Error\r\nContent-Type: text/plain\r\n${headers_close}500 Internal Server Error'
mime_types = {
'.css': 'text/css; charset=utf-8',