(trunk) minor tweak to gracefully handle leading spaces in the announce URL. Reported by Lacrocivious
This commit is contained in:
parent
2cbff8d444
commit
6355f031e4
|
@ -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 )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue