mirror of
git://erdgeist.org/opentracker
synced 2025-03-14 10:34:41 +08:00
Try to shake off too stupid clients by sending an Bittorrent error rather than an HTTP 400
This commit is contained in:
parent
6e1ee92de6
commit
10a6586ad1
@ -351,9 +351,11 @@ ANNOUNCE_WORKAROUND:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Scanned whole query string XXX better send Error */
|
/* Scanned whole query string */
|
||||||
if( !hash ) HTTPERROR_400_PARAM;
|
if( !hash ) {
|
||||||
|
reply_size = sprintf( static_outbuf + SUCCESS_HTTP_HEADER_LENGTH, "d14:failure reason81:Your client forgot to send your torrent's info_hash. Please upgrade your client.e" );
|
||||||
|
break;
|
||||||
|
}
|
||||||
if( OT_FLAG( &peer ) & PEER_FLAG_STOPPED ) {
|
if( OT_FLAG( &peer ) & PEER_FLAG_STOPPED ) {
|
||||||
remove_peer_from_torrent( hash, &peer );
|
remove_peer_from_torrent( hash, &peer );
|
||||||
reply_size = sprintf( static_outbuf + SUCCESS_HTTP_HEADER_LENGTH, "d8:completei0e10:incompletei0e8:intervali%ie5:peers0:e", OT_CLIENT_REQUEST_INTERVAL_RANDOM );
|
reply_size = sprintf( static_outbuf + SUCCESS_HTTP_HEADER_LENGTH, "d8:completei0e10:incompletei0e8:intervali%ie5:peers0:e", OT_CLIENT_REQUEST_INTERVAL_RANDOM );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user