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

vweb: fix redirect()

This commit is contained in:
Alexander Medvednikov 2019-12-08 01:05:57 +03:00
parent 30fc29fa6d
commit b1174428a5

View File

@ -57,7 +57,7 @@ pub fn (ctx Context) json(s string) {
}
pub fn (ctx Context) redirect(url string) {
ctx.conn.write('HTTP/1.1 302 Found\r\nLocation: $url\r\n\r\n$ctx.headers') or { panic(err) }
ctx.conn.write('HTTP/1.1 302 Found\r\nLocation: $url\r\n$ctx.headers\r\n\r\n') or { panic(err) }
}
pub fn (ctx Context) not_found(s string) {