(trunk) minor tweak to gracefully handle leading spaces in the announce URL. Reported by Lacrocivious

This commit is contained in:
Charles Kerr 2007-08-08 23:48:10 +00:00
parent 2cbff8d444
commit 6355f031e4
1 changed files with 8 additions and 1 deletions

View File

@ -23,6 +23,7 @@
*****************************************************************************/
#include <assert.h>
#include <ctype.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
@ -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 )
{