From 6355f031e49368ddab8c6d995f3c41fdc3032166 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 8 Aug 2007 23:48:10 +0000 Subject: [PATCH] (trunk) minor tweak to gracefully handle leading spaces in the announce URL. Reported by Lacrocivious --- libtransmission/http.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libtransmission/http.c b/libtransmission/http.c index 891d38c23..e9b7f65fd 100644 --- a/libtransmission/http.c +++ b/libtransmission/http.c @@ -23,6 +23,7 @@ *****************************************************************************/ #include +#include #include #include #include @@ -344,12 +345,18 @@ tr_httpParseUrl( const char * url, int len, const char * pathstart, * hostend; int ii, colon, portnum; char str[6]; - + if( 0 > len ) { len = strlen( url ); } + while( len && url && isspace(*url) ) + { + --len; + ++url; + } + ii = tr_httpIsUrl( url, len ); if( 0 >= ii ) {