diff options
author | erdgeist <> | 2007-10-23 00:01:10 +0000 |
---|---|---|
committer | erdgeist <> | 2007-10-23 00:01:10 +0000 |
commit | 69c6e2bc9909bdeef41cba66049c1550d6dad8fe (patch) | |
tree | a8f53a1504b89e4b6b0c47966d84eb53a4d582c9 | |
parent | 68a104ad2af9ae3a2d2354913951a4a64e347309 (diff) |
This uTorrent/1600 client requires some... measures :/ I dont like the workaround.
-rw-r--r-- | opentracker.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/opentracker.c b/opentracker.c index 65c9c93..68d7a2e 100644 --- a/opentracker.c +++ b/opentracker.c | |||
@@ -420,18 +420,23 @@ SCRAPE_WORKAROUND: | |||
420 | continue; | 420 | continue; |
421 | } | 421 | } |
422 | /* ignore this, when we have less than 20 bytes */ | 422 | /* ignore this, when we have less than 20 bytes */ |
423 | if( scan_urlencoded_query( &c, data = c, SCAN_SEARCHPATH_VALUE ) < (ssize_t)sizeof(ot_hash) ) HTTPERROR_400_PARAM; | 423 | if( scan_urlencoded_query( &c, data = c, SCAN_SEARCHPATH_VALUE ) != (ssize_t)sizeof(ot_hash) ) { |
424 | #ifdef WANT_UTORRENT1600_WORKAROUND | ||
425 | if( data[20] != '?' ) | ||
426 | #endif | ||
427 | HTTPERROR_400_PARAM; | ||
428 | } | ||
424 | if( scrape_count < OT_MAXMULTISCRAPE_COUNT ) | 429 | if( scrape_count < OT_MAXMULTISCRAPE_COUNT ) |
425 | memmove( multiscrape_buf + scrape_count++, data, sizeof(ot_hash) ); | 430 | memmove( multiscrape_buf + scrape_count++, data, sizeof(ot_hash) ); |
426 | break; | 431 | break; |
427 | } | 432 | } |
428 | } | 433 | } |
429 | 434 | ||
435 | UTORRENT1600_WORKAROUND: | ||
436 | |||
430 | /* No info_hash found? Inform user */ | 437 | /* No info_hash found? Inform user */ |
431 | if( !scrape_count ) HTTPERROR_400_PARAM; | 438 | if( !scrape_count ) HTTPERROR_400_PARAM; |
432 | 439 | ||
433 | UTORRENT1600_WORKAROUND: | ||
434 | |||
435 | /* Enough for http header + whole scrape string */ | 440 | /* Enough for http header + whole scrape string */ |
436 | if( !( reply_size = return_tcp_scrape_for_torrent( multiscrape_buf, scrape_count, SUCCESS_HTTP_HEADER_LENGTH + static_outbuf ) ) ) HTTPERROR_500; | 441 | if( !( reply_size = return_tcp_scrape_for_torrent( multiscrape_buf, scrape_count, SUCCESS_HTTP_HEADER_LENGTH + static_outbuf ) ) ) HTTPERROR_500; |
437 | 442 | ||