summaryrefslogtreecommitdiff
path: root/opentracker.c
diff options
context:
space:
mode:
authorerdgeist <>2007-01-31 09:58:32 +0000
committererdgeist <>2007-01-31 09:58:32 +0000
commit10a6586ad19db2238d127aed5050f4796c153744 (patch)
treea8302230d6d39986c9629f84be555180dd81e2d7 /opentracker.c
parent6e1ee92de6ff1f9b29453c8ae1d2d831db6a3e1a (diff)
Try to shake off too stupid clients by sending an Bittorrent error rather than an HTTP 400
Diffstat (limited to 'opentracker.c')
-rw-r--r--opentracker.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/opentracker.c b/opentracker.c
index 21c32a2..030e423 100644
--- a/opentracker.c
+++ b/opentracker.c
@@ -351,9 +351,11 @@ ANNOUNCE_WORKAROUND:
351 } 351 }
352 } 352 }
353 353
354 /* Scanned whole query string XXX better send Error */ 354 /* Scanned whole query string */
355 if( !hash ) HTTPERROR_400_PARAM; 355 if( !hash ) {
356 356 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" );
357 break;
358 }
357 if( OT_FLAG( &peer ) & PEER_FLAG_STOPPED ) { 359 if( OT_FLAG( &peer ) & PEER_FLAG_STOPPED ) {
358 remove_peer_from_torrent( hash, &peer ); 360 remove_peer_from_torrent( hash, &peer );
359 reply_size = sprintf( static_outbuf + SUCCESS_HTTP_HEADER_LENGTH, "d8:completei0e10:incompletei0e8:intervali%ie5:peers0:e", OT_CLIENT_REQUEST_INTERVAL_RANDOM ); 361 reply_size = sprintf( static_outbuf + SUCCESS_HTTP_HEADER_LENGTH, "d8:completei0e10:incompletei0e8:intervali%ie5:peers0:e", OT_CLIENT_REQUEST_INTERVAL_RANDOM );