Browse Source

This uTorrent/1600 client requires some... measures :/ I dont like the workaround.

dynamic-accesslists
erdgeist 17 years ago
parent
commit
69c6e2bc99
  1. 11
      opentracker.c

11
opentracker.c

@ -420,18 +420,23 @@ SCRAPE_WORKAROUND: @@ -420,18 +420,23 @@ SCRAPE_WORKAROUND:
continue;
}
/* ignore this, when we have less than 20 bytes */
if( scan_urlencoded_query( &c, data = c, SCAN_SEARCHPATH_VALUE ) < (ssize_t)sizeof(ot_hash) ) HTTPERROR_400_PARAM;
if( scan_urlencoded_query( &c, data = c, SCAN_SEARCHPATH_VALUE ) != (ssize_t)sizeof(ot_hash) ) {
#ifdef WANT_UTORRENT1600_WORKAROUND
if( data[20] != '?' )
#endif
HTTPERROR_400_PARAM;
}
if( scrape_count < OT_MAXMULTISCRAPE_COUNT )
memmove( multiscrape_buf + scrape_count++, data, sizeof(ot_hash) );
break;
}
}
UTORRENT1600_WORKAROUND:
/* No info_hash found? Inform user */
if( !scrape_count ) HTTPERROR_400_PARAM;
UTORRENT1600_WORKAROUND:
/* Enough for http header + whole scrape string */
if( !( reply_size = return_tcp_scrape_for_torrent( multiscrape_buf, scrape_count, SUCCESS_HTTP_HEADER_LENGTH + static_outbuf ) ) ) HTTPERROR_500;

Loading…
Cancel
Save