mirror of
git://erdgeist.org/opentracker
synced 2025-04-02 03:17:16 +08:00
Be even more stupidistas-tolerant
This commit is contained in:
parent
84f8738b82
commit
8098adb48e
@ -429,14 +429,17 @@ SCRAPE_WORKAROUND:
|
|||||||
/******************************
|
/******************************
|
||||||
* A N N O U N C E *
|
* A N N O U N C E *
|
||||||
******************************/
|
******************************/
|
||||||
|
case 7:
|
||||||
|
if( byte_diff( data, 7, "announc" ) ) HTTPERROR_404;
|
||||||
|
goto ANNOUNCE_WORKAROUND;
|
||||||
case 8:
|
case 8:
|
||||||
if( byte_diff( data, 8, "announce" ) ) HTTPERROR_404;
|
if( byte_diff( data, 8, "announce" ) ) HTTPERROR_404;
|
||||||
|
|
||||||
/* This is to hack around stupid clients that send "announce ?info_hash" */
|
|
||||||
if( !byte_diff( c, 2, " ?" ) ) c+=2;
|
|
||||||
|
|
||||||
ANNOUNCE_WORKAROUND:
|
ANNOUNCE_WORKAROUND:
|
||||||
|
|
||||||
|
/* This is to hack around stupid clients that send "announce ?info_hash" */
|
||||||
|
if( !byte_diff( c+1, 5, "?info" ) ) c+=2;
|
||||||
|
|
||||||
OT_SETIP( &peer, ((struct http_data*)io_getcookie( s ) )->ip );
|
OT_SETIP( &peer, ((struct http_data*)io_getcookie( s ) )->ip );
|
||||||
OT_SETPORT( &peer, &port );
|
OT_SETPORT( &peer, &port );
|
||||||
OT_FLAG( &peer ) = 0;
|
OT_FLAG( &peer ) = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user