remove redundant get_mime_type() function
This commit is contained in:
		
							
								
								
									
										5
									
								
								Main.gd
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								Main.gd
									
									
									
									
									
								
							@@ -77,8 +77,3 @@ func _serve_file(_request: HTTPServer.Request, response: HTTPServer.Response, bi
 | 
				
			|||||||
	else:
 | 
						else:
 | 
				
			||||||
		response.header("content-type", "text/plain")
 | 
							response.header("content-type", "text/plain")
 | 
				
			||||||
		response.data("500 - Read Error")
 | 
							response.data("500 - Read Error")
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func get_mime_type(file_name: String) -> String:
 | 
					 | 
				
			||||||
	var ext := file_name.get_extension().to_lower()
 | 
					 | 
				
			||||||
	return mime_types[ext] if ext in mime_types else "application/octet-stream"
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user