mldonkey-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co...


From: mldonkey-commits
Subject: [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co...
Date: Fri, 05 May 2006 22:08:01 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Branch:         
Changes by:     spiralvoice <address@hidden>    06/05/05 22:08:01

Modified files:
        distrib        : ChangeLog 
        src/daemon/common: commonBitzi.ml commonOptions.ml commonWeb.ml 
        src/daemon/driver: driverCommands.ml driverInterface.ml 
        src/networks/bittorrent: bTOptions.ml 
        src/networks/donkey: donkeyInteractive.ml 
        src/networks/fasttrack: fasttrackProtocol.ml 
        src/networks/fileTP: fileTPHTTP.ml fileTPOptions.ml 
        src/networks/gnutella: gnutellaClients.ml gnutellaOptions.ml 
                               gnutellaProtocol.ml gnutellaRedirector.ml 
                               gnutellaServers.ml 
        src/networks/gnutella2: g2Redirector.ml 

Log message:
        patch #5068

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/distrib/ChangeLog.diff?tr1=1.804&tr2=1.805&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/daemon/common/commonBitzi.ml.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/daemon/common/commonOptions.ml.diff?tr1=1.139&tr2=1.140&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/daemon/common/commonWeb.ml.diff?tr1=1.29&tr2=1.30&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/daemon/driver/driverCommands.ml.diff?tr1=1.135&tr2=1.136&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/daemon/driver/driverInterface.ml.diff?tr1=1.41&tr2=1.42&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/bittorrent/bTOptions.ml.diff?tr1=1.26&tr2=1.27&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyInteractive.ml.diff?tr1=1.99&tr2=1.100&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/fasttrack/fasttrackProtocol.ml.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/fileTP/fileTPHTTP.ml.diff?tr1=1.21&tr2=1.22&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/fileTP/fileTPOptions.ml.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/gnutella/gnutellaClients.ml.diff?tr1=1.38&tr2=1.39&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/gnutella/gnutellaOptions.ml.diff?tr1=1.18&tr2=1.19&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/gnutella/gnutellaProtocol.ml.diff?tr1=1.20&tr2=1.21&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/gnutella/gnutellaRedirector.ml.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/gnutella/gnutellaServers.ml.diff?tr1=1.24&tr2=1.25&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/gnutella2/g2Redirector.ml.diff?tr1=1.8&tr2=1.9&r1=text&r2=text

Patches:
Index: mldonkey/distrib/ChangeLog
diff -u mldonkey/distrib/ChangeLog:1.804 mldonkey/distrib/ChangeLog:1.805
--- mldonkey/distrib/ChangeLog:1.804    Fri May  5 22:02:37 2006
+++ mldonkey/distrib/ChangeLog  Fri May  5 22:08:00 2006
@@ -15,6 +15,8 @@
 =========
 
 2006/05/06
+5068: New global option user_agent, current option BT-user_agent overrides
+      the global value in BT module (pango)
 5064: BT: only try to connect to http trackers (pango)
 5040: Overnet: Open TCP port only when network is active
 
Index: mldonkey/src/daemon/common/commonBitzi.ml
diff -u mldonkey/src/daemon/common/commonBitzi.ml:1.7 
mldonkey/src/daemon/common/commonBitzi.ml:1.8
--- mldonkey/src/daemon/common/commonBitzi.ml:1.7       Thu Jul 28 18:22:31 2005
+++ mldonkey/src/daemon/common/commonBitzi.ml   Fri May  5 22:08:00 2006
@@ -117,7 +117,7 @@
       H.basic_request with
 
       H.req_url = Url.of_string url;
-      H.req_user_agent = "Mozilla/5.0 (Linux 2.4.19-16mdk i686; U) Opera 6.11  
[en]";
+      H.req_user_agent = get_user_agent ();
       H.req_referer = None;
       H.req_request = H.GET;
     } in
Index: mldonkey/src/daemon/common/commonOptions.ml
diff -u mldonkey/src/daemon/common/commonOptions.ml:1.139 
mldonkey/src/daemon/common/commonOptions.ml:1.140
--- mldonkey/src/daemon/common/commonOptions.ml:1.139   Mon Apr 10 19:16:36 2006
+++ mldonkey/src/daemon/common/commonOptions.ml Fri May  5 22:08:00 2006
@@ -818,6 +818,15 @@
     ourself. Don't set this option to true if you have dynamic IP."
     bool_option false
 
+let user_agent = define_option current_section ["user_agent"]
+    "User agent string (default = \"default\")"
+    string_option "default"
+
+let get_user_agent () = 
+  if !!user_agent = "default" then
+     Printf.sprintf "MLDonkey/%s" Autoconf.current_version
+  else !!user_agent
+
 let web_infos = define_option current_section ["web_infos"]
     "A list of lines to download on the WEB: each line has
     the format: (kind, period, url), where kind is either
Index: mldonkey/src/daemon/common/commonWeb.ml
diff -u mldonkey/src/daemon/common/commonWeb.ml:1.29 
mldonkey/src/daemon/common/commonWeb.ml:1.30
--- mldonkey/src/daemon/common/commonWeb.ml:1.29        Wed Mar 29 14:22:08 2006
+++ mldonkey/src/daemon/common/commonWeb.ml     Fri May  5 22:08:00 2006
@@ -68,8 +68,7 @@
           ) "" cookies
         ) ]
       with Not_found -> []);
-      H.req_user_agent =
-      Printf.sprintf "MLDonkey/%s" Autoconf.current_version;
+      H.req_user_agent = get_user_agent ();
       H.req_max_retry = 20;
     } in
     let r1 = {
Index: mldonkey/src/daemon/driver/driverCommands.ml
diff -u mldonkey/src/daemon/driver/driverCommands.ml:1.135 
mldonkey/src/daemon/driver/driverCommands.ml:1.136
--- mldonkey/src/daemon/driver/driverCommands.ml:1.135  Sun Apr  9 00:27:03 2006
+++ mldonkey/src/daemon/driver/driverCommands.ml        Fri May  5 22:08:00 2006
@@ -2865,8 +2865,7 @@
                       ) "" cookies
                     ) ]
                 with Not_found -> []);
-                H.req_user_agent =
-                       Printf.sprintf "MLDonkey/%s" Autoconf.current_version;
+                H.req_user_agent = get_user_agent ();
             } in
             H.whead r
                 (fun headers ->
Index: mldonkey/src/daemon/driver/driverInterface.ml
diff -u mldonkey/src/daemon/driver/driverInterface.ml:1.41 
mldonkey/src/daemon/driver/driverInterface.ml:1.42
--- mldonkey/src/daemon/driver/driverInterface.ml:1.41  Wed Mar  1 20:04:09 2006
+++ mldonkey/src/daemon/driver/driverInterface.ml       Fri May  5 22:08:00 2006
@@ -773,8 +773,7 @@
                     H.req_url =  u;
                     H.req_proxy = !CommonOptions.http_proxy;
                     H.req_request = H.HEAD;
-                    H.req_user_agent = 
-                       Printf.sprintf "MLDonkey/%s" Autoconf.current_version;
+                    H.req_user_agent = get_user_agent ();
                 } in
                 H.whead r 
                   (fun headers ->
Index: mldonkey/src/networks/bittorrent/bTOptions.ml
diff -u mldonkey/src/networks/bittorrent/bTOptions.ml:1.26 
mldonkey/src/networks/bittorrent/bTOptions.ml:1.27
--- mldonkey/src/networks/bittorrent/bTOptions.ml:1.26  Sun Mar  5 10:43:47 2006
+++ mldonkey/src/networks/bittorrent/bTOptions.ml       Fri May  5 22:08:00 2006
@@ -132,5 +132,5 @@
 
 let get_user_agent () = 
   if !!user_agent = "default" then
-     Printf.sprintf "MLDonkey/%s" Autoconf.current_version
+    CommonOptions.get_user_agent ()
   else !!user_agent
Index: mldonkey/src/networks/donkey/donkeyInteractive.ml
diff -u mldonkey/src/networks/donkey/donkeyInteractive.ml:1.99 
mldonkey/src/networks/donkey/donkeyInteractive.ml:1.100
--- mldonkey/src/networks/donkey/donkeyInteractive.ml:1.99      Sun Apr  9 
00:27:03 2006
+++ mldonkey/src/networks/donkey/donkeyInteractive.ml   Fri May  5 22:08:00 2006
@@ -168,8 +168,7 @@
       H.basic_request with
       H.req_url = Url.of_string url;
       H.req_proxy = !CommonOptions.http_proxy;
-      H.req_user_agent =
-  Printf.sprintf "MLDonkey/%s" Autoconf.current_version;
+      H.req_user_agent = get_user_agent ();
       H.req_max_retry = 10;
     } in
     H.wget r (fun filename ->
Index: mldonkey/src/networks/fasttrack/fasttrackProtocol.ml
diff -u mldonkey/src/networks/fasttrack/fasttrackProtocol.ml:1.11 
mldonkey/src/networks/fasttrack/fasttrackProtocol.ml:1.12
--- mldonkey/src/networks/fasttrack/fasttrackProtocol.ml:1.11   Sun Feb  5 
13:19:14 2006
+++ mldonkey/src/networks/fasttrack/fasttrackProtocol.ml        Fri May  5 
22:08:00 2006
@@ -225,7 +225,7 @@
       ]
     end;  *)
   let headers =
-(*      Printf.bprintf buf "User-Agent: %s\r\n" user_agent; *)
+(*      Printf.bprintf buf "User-Agent: %s\r\n" (get_user_agent ()); *)
     ("X-Kazaa-Network", FasttrackNetwork.network_name) ::
     ("Connection", "Keep-Alive") ::
     ("X-Kazaa-Username", client_name ()) ::
Index: mldonkey/src/networks/fileTP/fileTPHTTP.ml
diff -u mldonkey/src/networks/fileTP/fileTPHTTP.ml:1.21 
mldonkey/src/networks/fileTP/fileTPHTTP.ml:1.22
--- mldonkey/src/networks/fileTP/fileTPHTTP.ml:1.21     Sun Apr  9 00:27:04 2006
+++ mldonkey/src/networks/fileTP/fileTPHTTP.ml  Fri May  5 22:08:00 2006
@@ -82,7 +82,7 @@
                   Printf.bprintf buf "GET /get/%d/%s HTTP/1.1\r\n" index
                     name); *)
   Printf.bprintf buf "Host: %s\r\n" c.client_hostname;
-  Printf.bprintf buf "User-Agent: %s\r\n" user_agent;
+  Printf.bprintf buf "User-Agent: %s\r\n" (get_user_agent ());
   Printf.bprintf buf "Referer: %s\r\n" c.client_referer;
   Printf.bprintf buf "Range: bytes=%s\r\n" range;
   Printf.bprintf buf "Connection: Keep-Alive\r\n";
@@ -353,7 +353,7 @@
       H.req_url = url;
       H.req_proxy = !CommonOptions.http_proxy;
       H.req_request = H.HEAD;
-      H.req_user_agent = user_agent;
+      H.req_user_agent = get_user_agent ();
     } in
 
   H.whead r (fun headers ->
Index: mldonkey/src/networks/fileTP/fileTPOptions.ml
diff -u mldonkey/src/networks/fileTP/fileTPOptions.ml:1.9 
mldonkey/src/networks/fileTP/fileTPOptions.ml:1.10
--- mldonkey/src/networks/fileTP/fileTPOptions.ml:1.9   Sat Nov  5 16:23:41 2005
+++ mldonkey/src/networks/fileTP/fileTPOptions.ml       Fri May  5 22:08:01 2006
@@ -32,8 +32,6 @@
     bool_option true
 *)
 
-let user_agent = Printf.sprintf "MLdonkey/%s" Autoconf.current_version
-
 let mirrors = define_option fileTP_section ["mirrors"]
     "A list of lists, where each list contains equivalent prefixes for mirrors"
     (list_option (list_option string_option))
Index: mldonkey/src/networks/gnutella/gnutellaClients.ml
diff -u mldonkey/src/networks/gnutella/gnutellaClients.ml:1.38 
mldonkey/src/networks/gnutella/gnutellaClients.ml:1.39
--- mldonkey/src/networks/gnutella/gnutellaClients.ml:1.38      Sun Apr  9 
00:27:04 2006
+++ mldonkey/src/networks/gnutella/gnutellaClients.ml   Fri May  5 22:08:01 2006
@@ -857,7 +857,7 @@
         begin
           gconn.gconn_client_info_sent <- true;
           ("Remote-IP", Ip.to_string (fst (peer_addr sock)) ) ::
-          ("Server", user_agent) :: headers
+          ("Server", get_user_agent ()) :: headers
         end
     in
     make_http_header s headers
Index: mldonkey/src/networks/gnutella/gnutellaOptions.ml
diff -u mldonkey/src/networks/gnutella/gnutellaOptions.ml:1.18 
mldonkey/src/networks/gnutella/gnutellaOptions.ml:1.19
--- mldonkey/src/networks/gnutella/gnutellaOptions.ml:1.18      Sat Nov  5 
16:23:41 2005
+++ mldonkey/src/networks/gnutella/gnutellaOptions.ml   Fri May  5 22:08:01 2006
@@ -85,8 +85,6 @@
 (* (Ip.of_string "64.61.25.171")   *)
   
   
-let user_agent = Printf.sprintf "MLdonkey/%s" Autoconf.current_version
-
 let max_known_ultrapeers = define_option gnutella_section 
["max_known_ultrapeers"]
   "Maximal number of ultrapeers remembered"
     int_option 500
Index: mldonkey/src/networks/gnutella/gnutellaProtocol.ml
diff -u mldonkey/src/networks/gnutella/gnutellaProtocol.ml:1.20 
mldonkey/src/networks/gnutella/gnutellaProtocol.ml:1.21
--- mldonkey/src/networks/gnutella/gnutellaProtocol.ml:1.20     Sun Apr  9 
00:27:04 2006
+++ mldonkey/src/networks/gnutella/gnutellaProtocol.ml  Fri May  5 22:08:01 2006
@@ -170,7 +170,7 @@
 let add_header_fields header sock trailer =
   let buf = Buffer.create 100 in
   Printf.bprintf buf "%s" header;
-  Printf.bprintf buf "User-Agent: %s\r\n" user_agent;
+  Printf.bprintf buf "User-Agent: %s\r\n" (get_user_agent ());
   Printf.bprintf buf "X-My-Address: %s:%d\r\n"
     (Ip.to_string (client_ip (Some sock))) !!client_port;
   Printf.bprintf buf "X-Ultrapeer: False\r\n";
@@ -403,7 +403,7 @@
   
 let make_download_request c s headers =
   let headers =
-    ("User-Agent", user_agent) ::
+    ("User-Agent", get_user_agent ()) ::
     ("Connection", "Keep-Alive") ::
     (match c.client_host with
         None -> headers
Index: mldonkey/src/networks/gnutella/gnutellaRedirector.ml
diff -u mldonkey/src/networks/gnutella/gnutellaRedirector.ml:1.10 
mldonkey/src/networks/gnutella/gnutellaRedirector.ml:1.11
--- mldonkey/src/networks/gnutella/gnutellaRedirector.ml:1.10   Wed Dec 14 
21:17:47 2005
+++ mldonkey/src/networks/gnutella/gnutellaRedirector.ml        Fri May  5 
22:08:01 2006
@@ -66,8 +66,7 @@
           H.basic_request with
           H.req_url = Url.of_string url;
           H.req_proxy = !CommonOptions.http_proxy;
-          H.req_user_agent = 
-          Printf.sprintf "MLDonkey/%s" Autoconf.current_version;
+          H.req_user_agent = get_user_agent ();
         } in
       if !verbose then
         lprintf "Connecting Gnutella %s\n" url;
@@ -109,8 +108,7 @@
           H.basic_request with
           H.req_url = Url.of_string url;
           H.req_proxy = !CommonOptions.http_proxy;
-          H.req_user_agent = 
-          Printf.sprintf "MLDonkey/%s" Autoconf.current_version;
+          H.req_user_agent = get_user_agent ();
         } in
       if !verbose then
         lprintf "Connecting Gnutella %s\n" url;
Index: mldonkey/src/networks/gnutella/gnutellaServers.ml
diff -u mldonkey/src/networks/gnutella/gnutellaServers.ml:1.24 
mldonkey/src/networks/gnutella/gnutellaServers.ml:1.25
--- mldonkey/src/networks/gnutella/gnutellaServers.ml:1.24      Mon Jan  9 
00:22:35 2006
+++ mldonkey/src/networks/gnutella/gnutellaServers.ml   Fri May  5 22:08:01 2006
@@ -487,7 +487,7 @@
 let make_handshake_request_headers req =
   let headers = [
 (* Other Gnutella headers *)          
-      ("User-Agent", user_agent) ;
+      ("User-Agent", get_user_agent ()) ;
       ("X-Max-TTL", "4") ;
       ("Vendor-Message", "0.1") ;
       ("X-Query-Routing", "0.1") ;
Index: mldonkey/src/networks/gnutella2/g2Redirector.ml
diff -u mldonkey/src/networks/gnutella2/g2Redirector.ml:1.8 
mldonkey/src/networks/gnutella2/g2Redirector.ml:1.9
--- mldonkey/src/networks/gnutella2/g2Redirector.ml:1.8 Wed Dec 14 21:17:47 2005
+++ mldonkey/src/networks/gnutella2/g2Redirector.ml     Fri May  5 22:08:01 2006
@@ -75,8 +75,7 @@
               H.basic_request with
               H.req_url = Url.of_string url;
               H.req_proxy = !CommonOptions.http_proxy;
-              H.req_user_agent = 
-              Printf.sprintf "MLDonkey/%s" Autoconf.current_version;
+              H.req_user_agent = get_user_agent ();
             } in
           if !verbose then
             lprintf "Connecting G2 redirector\n";




reply via email to

[Prev in Thread] Current Thread [Next in Thread]