From 10a6586ad19db2238d127aed5050f4796c153744 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Wed, 31 Jan 2007 09:58:32 +0000 Subject: Try to shake off too stupid clients by sending an Bittorrent error rather than an HTTP 400 --- opentracker.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'opentracker.c') diff --git a/opentracker.c b/opentracker.c index 21c32a2..030e423 100644 --- a/opentracker.c +++ b/opentracker.c @@ -351,9 +351,11 @@ ANNOUNCE_WORKAROUND: } } - /* Scanned whole query string XXX better send Error */ - if( !hash ) HTTPERROR_400_PARAM; - + /* Scanned whole query string */ + 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 ) { 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 ); -- cgit v1.2.3