|  | @@ -3960,8 +3960,9 @@ static void handle_static_file_request(struct mg_connection *conn, const char *p
 | 
	
		
			
				|  |  |      mg_fclose(filep);
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -void mg_send_file(struct mg_connection *conn, const char *path)
 | 
	
		
			
				|  |  | +void mg_send_file2(struct mg_connection *conn, const char *path, int timeout)
 | 
	
		
			
				|  |  |  {
 | 
	
		
			
				|  |  | +timeout???
 | 
	
		
			
				|  |  |      struct file file = STRUCT_FILE_INITIALIZER;
 | 
	
		
			
				|  |  |      if (mg_stat(conn, path, &file)) {
 | 
	
		
			
				|  |  |          if (file.is_directory) {
 | 
	
	
		
			
				|  | @@ -3979,6 +3980,10 @@ void mg_send_file(struct mg_connection *conn, const char *path)
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +void mg_send_file(struct mg_connection *conn, const char *path)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +    mg_send_file2(conn, path, TIMEOUT_INFINITE);
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  /* Parse HTTP headers from the given buffer, advance buffer to the point
 | 
	
		
			
				|  |  |     where parsing stopped. */
 | 
	
	
		
			
				|  | @@ -5482,7 +5487,7 @@ static uint32_t get_remote_ip(const struct mg_connection *conn)
 | 
	
		
			
				|  |  |      return ntohl(* (uint32_t *) &conn->client.rsa.sin.sin_addr);
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -int mg_upload(struct mg_connection *conn, const char *destination_dir)
 | 
	
		
			
				|  |  | +int mg_upload2(struct mg_connection *conn, const char *destination_dir, int timeout)
 | 
	
		
			
				|  |  |  {
 | 
	
		
			
				|  |  |      const char *content_type_header, *boundary_start, *sc;
 | 
	
		
			
				|  |  |      char *s;
 | 
	
	
		
			
				|  | @@ -5627,6 +5632,11 @@ int mg_upload(struct mg_connection *conn, const char *destination_dir)
 | 
	
		
			
				|  |  |      return num_uploaded_files;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +int mg_upload(struct mg_connection *conn, const char *destination_dir)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +    return mg_upload2(conn, destination_dir, TIMEOUT_INFINITE, NULL);
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  static int get_first_ssl_listener_index(const struct mg_context *ctx)
 | 
	
		
			
				|  |  |  {
 | 
	
		
			
				|  |  |      int i, idx = -1;
 |