SVN: toys/rsget.pl/Direct/HTTP

sparky sparky at pld-linux.org
Sat Jun 26 22:29:07 CEST 2010


Author: sparky
Date: Sat Jun 26 22:29:06 2010
New Revision: 11595

Modified:
   toys/rsget.pl/Direct/HTTP
Log:
- added redirect detection, for arbitrary redirecting sites


Modified: toys/rsget.pl/Direct/HTTP
==============================================================================
--- toys/rsget.pl/Direct/HTTP	(original)
+++ toys/rsget.pl/Direct/HTTP	Sat Jun 26 22:29:06 2010
@@ -22,6 +22,9 @@
 	my ( $len ) = /^Content-Length:\s*(\d+)\r?$/mi;
 	$len ||= -1;
 
+	if ( /^Location:\s*\s+/mi ) {
+		LINK( $-{_referer} );
+	}
 	ERROR( "file is text ($type)" ) if $type =~ m#^text/#;
 	ERROR( "file is a small image ($type, $len)" )
 		if $type =~ m#^image/# and $len < 100 * 1024;


More information about the pld-cvs-commit mailing list