vweb: remove favicon hack

pull/1437/head^2
Alexander Medvednikov 2019-08-02 10:15:18 +00:00
parent 8990eb06ec
commit ed3f1d315b
1 changed files with 2 additions and 7 deletions

View File

@ -120,15 +120,10 @@ pub fn run<T>(port int) {
first_line := s.all_before('\n')
vals := first_line.split(' ')
mut action := vals[1].right(1).all_before('/')
println('vweb.v: action="$action"')
if action.contains('?') {
action = action.all_before('?')
}
if action == 'favicon.ico' {
println('favicon.ico')
conn.write('HTTP/1.1 404 Not Found')
conn.close()
continue
}
if action == '' {
action = 'index'
}
@ -170,7 +165,7 @@ pub fn run<T>(port int) {
conn.write('HTTP/1.1 404 Not Found
Content-Type: text/plain
404 not found
404 not found
')
}
conn.close()