overall Posted May 25, 2009 Report Posted May 25, 2009 (sorry for my english)I'm a co-developer of BitTorrent module for Drupal.I have this error.uTorrent 1.8.2 build 14458This error appear for following tracker responses:d8:completei0e10:downloadedi0e10:incompletei0e8:intervali1800e12:min intervali600e5:peersld2:ip9:127.0.0.17:peer_id20:-UT1820-z8Г=‚8‚VѓЅђ4:porti26573eeeed8:completei0e10:downloadedi0e10:incompletei0e8:intervali1800e12:min intervali600e5:peersleePlease help to understand where is the problem.
Ultima Posted May 26, 2009 Report Posted May 26, 2009 Well, from what I can tell in the protocol descriptions found here and here, if you're going to send a list of dictionaries as the peers key, then each dictionary is supposed to contain a peer id key, not a peer_id key. Alternatively, you can reduce the size (and complexity) of the tracker response by sending a binary string representation of the IP:port combination (described in the first link) instead of a list of dictionaries.At any rate, I'm not sure whether peer id vs peer_id would cause the error to occur, but considering the fact that you're violating the specs by sending the latter instead of the former, it wouldn't surprise me if that was the problem.
overall Posted May 26, 2009 Author Report Posted May 26, 2009 Thanks for the answer, but unfortunately nothing changed.Next responses raise the error:d8:completei0e10:downloadedi0e10:incompletei0e8:intervali1800e12:min intervali600e5:peersld2:ip9:127.0.0.17:peer id20:-UT1820-z8Г=‚8‚VѓЅђ4:porti26573eeeed8:completei0e10:downloadedi0e10:incompletei0e8:intervali1800e12:min intervali600e5:peers6: gНed8:completei0e10:downloadedi0e10:incompletei0e8:intervali1800e12:min intervali600e5:peers0:eAlso I have found that "downloaded" is not supported (inserted into response by accident).I have remove it, but nothing changed.
DreadWingKnight Posted May 26, 2009 Report Posted May 26, 2009 Are you using a pre-existing bencode library for generating your announce replies or are you trying to hand-code it.
overall Posted May 26, 2009 Author Report Posted May 26, 2009 I don't know because this part of module was written by other guy.A have to say that it worked fine before this moment.
DreadWingKnight Posted May 26, 2009 Report Posted May 26, 2009 That would be important to know, in case the bencoding on the reply is malformed.
overall Posted May 26, 2009 Author Report Posted May 26, 2009 I solved the problem.Actually script before send the response, send (output to output stream) bencoded "warning message" (use passkey with public tracker), then it try to send headers and the response itself, but because output has been started they already sent and php output a textual warning message to the output stream, which split whole response ("warning message" and response itself) into two parts.Therefore uTorrent can not find the "peers". But I think that it would be better to show another error message in uTorrent for such case.The output example:d15:warning message63:Passkey is not needed: 9bd5f129aafd658211d3475b2e6293c8b396ff06e<br /><b>Warning</b>: Cannot modify header information - headers already sent by (output started at D:\Web\htdocs\sites\bittorrent-direct\modules\bittorrent\includes\bt_common.inc:620) in <b>D:\Web\htdocs\sites\bittorrent-direct\modules\bittorrent\includes\bt_common.inc</b> on line <b>618</b><br /><br /><b>Warning</b>: Cannot modify header information - headers already sent by (output started at D:\Web\htdocs\sites\bittorrent-direct\modules\bittorrent\includes\bt_common.inc:620) in <b>D:\Web\htdocs\sites\bittorrent-direct\modules\bittorrent\includes\bt_common.inc</b> on line <b>619</b><br />d8:completei0e10:incompletei0e8:intervali1800e12:min intervali600e5:peersld2:ip11:192.168.0.37:peer id20:-UT1820-z8ѓ~В§/IФK4:porti36226eeee
jewelisheaven Posted May 26, 2009 Report Posted May 26, 2009 I believe uT accepts/decodes ERROR key which is displayed in Tracker status column..?If you could find out whether the bencoder is custom or a library it would also be useful to decide whether a workaround would be useful in this case.
Ultima Posted May 26, 2009 Report Posted May 26, 2009 The problem isn't the bencoder. The problem is that the server was appending other messages to the response -- look at the output overall posted, and you'll notice that HTML is interspersed and concatenated with multiple bencoded dictionaries. Presumably, µTorrent is reading only the first dictionary in the server response and seeing the error instead of the expected peers list, so it spits the error back.Edit: Added missing word.
jewelisheaven Posted May 27, 2009 Report Posted May 27, 2009 I'll assume YOUR first sentence should be: The problem IS the bencoder.
Ultima Posted May 27, 2009 Report Posted May 27, 2009 Er, isn't. The data being returned by the tracker is clearly correctly bencoded, so bencoding couldn't have been the problem.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.