È in qualche modo possibile verificare se esiste un file, senza scaricarlo effettivamente?Controllare se il file web esiste, senza scaricarlo?
Ho questo file di grandi dimensioni (~ 40MB), ad esempio:
http://mirrors.sohu.com/mysql/MySQL-6.0/MySQL-6.0.11-0.glibc23.src.rpm
Questo è non strettamente correlate alle rubino, ma sarebbe bello se il mittente potrebbe impostare la lunghezza del contenuto.
RestClient.get "http://mirrors.sohu.com/mysql/MySQL-6.0/MySQL-6.0.11-0.glibc23.src.rpm",
headers: {"Content-Length" => 100}
Grazie. [Qui] (https://gist.github.com/1263189) è un esempio di esempio. – Oleander
@Oleander Works, giusto? –
Sì, ed è 15 secondi prima che possa darti * OK *. :) – Oleander