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