[bittorrent] encoding issue

Dazen D dazensix at gmail.com
Wed Aug 8 02:10:36 EDT 2007


ok. just to be fair, in fact i'm not working with any tracker
package, i'm doing some experiments on my own.

On 8/8/07, Harold Feit <dwknight at depthstrike.com> wrote:
> It's more of a tracker bug than a client feature.
>
> Most, if not all, other tracker packages are able to use the version
> encoded with the url-friendly characters left unencoded.
>
> Dazen D wrote:
> > all right, i got it. i don't think that java has a method to deal
> > with this kind of "mixed" string, but knowing that it's a
> > client feature it's easy to come up with something.
> > thank you very much for the help.
> >
> > On 8/8/07, Harold Feit <dwknight at depthstrike.com> wrote:
> >> You should have a language native urldecode function that converts the
> >> urlencoded infohash into a byte array.
> >>
> >> The reason that the client is sending j instead of %6a is because j is
> >> url-safe and saves bandwidth to send not encoded.
> >>
> >> Dazen D wrote:
> >>> by the decoded one you mean what?
> >>>
> >>> for me the decoded one should be:
> >>>
> >>> %6a%ad%5c%1d%01%69%25%c4%5e%ee%06%de%a9%95%3b%f5%48%d6%91%62
> >>>
> >>> having that i can convert this string in the byte array representing
> >>> the hash_info. but what i'm getting is:
> >>>
> >>> j%ad%5c%1d%01i%25%c4%5e%ee%06%de%a9%95%3b%f5H%d6%91b
> >>>
> >>> and i don't know how can i obtain my byte array from this one. am i
> >>> missing the reason why the client is sending 'j' instead of '%6a' ?
> >>>
> >>> On 8/7/07, Harold Feit <dwknight at depthstrike.com> wrote:
> >>>> Both are valid actually. You should not be using the urlencoded infohash
> >>>> to identify the torrent. Use a decoded one (20 bytes).
> >>>>
> >>>>
> >>>>
> >>>> Dazen D wrote:
> >>>>> Hi, i'm facing a strange problem trying to implement a tracker service
> >>>>> using java servlet technology (with Tomcat 6.0.13). When a typical
> >>>>> announce request arrives in the server, the info_hash parameter that i
> >>>>> get is:
> >>>>>
> >>>>> info_hash=j%ad%5c%1d%01i%25%c4%5e%ee%06%de%a9%95%3b%f5H%d6%91b
> >>>>>
> >>>>> In fact it should be :
> >>>>>
> >>>>> %6a%ad%5c%1d%01%69%25%c4%5e%ee%06%de%a9%95%3b%f5%48%d6%91%62
> >>>>>
> >>>>> but apparently some of the hex are arriving incorrectly, like 'j'
> >>>>> instead of '%6a'. When i send a similar request via browser like
> >>>>>
> >>>>> http://localhost?info_hash=%6a%ad%5c%1d%01%69%25%c4%5e%ee%06%de%a9%95%3b%f5%48%d6%91%62
> >>>>>
> >>>>> it works properly. I tested using uTorrent and Azureus and the problem
> >>>>> was the same. Any ideas about it? thanks a lot.
> >>>>>
> >>>>> dazen
> >>>>> _______________________________________________
> >>>>> BitTorrent mailing list
> >>>>> BitTorrent at lists.ibiblio.org
> >>>>> http://lists.ibiblio.org/mailman/listinfo/bittorrent
> >>>>
> >>> _______________________________________________
> >>> BitTorrent mailing list
> >>> BitTorrent at lists.ibiblio.org
> >>> http://lists.ibiblio.org/mailman/listinfo/bittorrent
> >>>
> >>>
> >>
> >
> >
>
>



More information about the BitTorrent mailing list