Author: alanmc
Date: 2008-02-16 19:00:01 -0500 (Sat, 16 Feb 2008)
New Revision: 95939

Modified:
   trunk/bitsharp/src/MonoTorrent/MonoTorrent.Client/Tracker/HTTPTracker.cs
Log:
Bugfix: the infohash needs to be urlencoded

Modified: 
trunk/bitsharp/src/MonoTorrent/MonoTorrent.Client/Tracker/HTTPTracker.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent/MonoTorrent.Client/Tracker/HTTPTracker.cs    
2008-02-16 23:55:11 UTC (rev 95938)
+++ trunk/bitsharp/src/MonoTorrent/MonoTorrent.Client/Tracker/HTTPTracker.cs    
2008-02-17 00:00:01 UTC (rev 95939)
@@ -79,9 +79,9 @@
             if (true)
             {
                 if (url.IndexOf('?') == -1)
-                    url += "?info_hash=" + infohash;
+                    url += "?info_hash=" + HttpUtility.UrlEncode(infohash);
                 else
-                    url += "&info_hash=" + infohash;
+                    url += "&info_hash=" + HttpUtility.UrlEncode(infohash);
             }
             request = (HttpWebRequest)HttpWebRequest.Create(url);
             id.Request = request;

_______________________________________________
Mono-patches maillist  -  Mono-patches@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to