HTTrack Website Copier
Free software offline browser - FORUM
Subject: Re: no connection if proxy configured on latest be
Author: Xavier Roche
Date: 06/24/2006 14:23
 
> I just installed HTTrack3.41-beta-1 and if I
> configure a proxy I can't really download anything.

Bug confirmed, and fixed scheduled for beta-2.
Thanks a lot for the bugreport!

Below, the fix against beta-1:

--- htsback.c.orig      2006-06-24 14:21:59.774390743 +0200
+++ htsback.c   2006-06-24 14:22:13.989150389 +0200
@@ -1580,7 +1580,13 @@
       // ne pas traiter ou recevoir l'en tĂȘte immĂ©diatement
       memset(&(back[p].r), 0, sizeof(htsblk)); back[p].r.soc=INVALID_SOCKET;
back[p].r.location=back[p].location_buffer;
       // recopier proxy
-      memcpy(&(back[p].r.req.proxy), &opt->proxy, sizeof(opt->proxy));
+      if ((back[p].r.req.proxy.active = opt->proxy.active)) {
+        if (StringBuff(opt->proxy.bindhost) != NULL)
+          strcpybuff(back[p].r.req.proxy.bindhost,
StringBuff(opt->proxy.bindhost));
+        if (StringBuff(opt->proxy.name) != NULL)
+          strcpybuff(back[p].r.req.proxy.name, StringBuff(opt->proxy.name));
+        back[p].r.req.proxy.port = opt->proxy.port;
+      }
       // et user-agent
       strcpy(back[p].r.req.user_agent,StringBuff(opt->user_agent));
       strcpy(back[p].r.req.referer,StringBuff(opt->referer));

--- htscore.c.orig      2006-06-24 14:22:09.847098207 +0200
+++ htscore.c   2006-06-24 14:18:17.000000000 +0200
@@ -800,7 +800,13 @@
     memset(&r, 0, sizeof(htsblk)); r.soc=INVALID_SOCKET;
     r.location=loc;    // en cas d'erreur 3xx (moved)
     // recopier proxy
-    memcpy(&(r.req.proxy), &opt->proxy, sizeof(opt->proxy));
+    if ((r.req.proxy.active = opt->proxy.active)) {
+      if (StringBuff(opt->proxy.bindhost) != NULL)
+        strcpybuff(r.req.proxy.bindhost, StringBuff(opt->proxy.bindhost));
+      if (StringBuff(opt->proxy.name) != NULL)
+        strcpybuff(r.req.proxy.name, StringBuff(opt->proxy.name));
+      r.req.proxy.port = opt->proxy.port;
+    }
     // et user-agent
     strcpy(r.req.user_agent,StringBuff(opt->user_agent));
     strcpy(r.req.referer,StringBuff(opt->referer));
 
Reply Create subthread


All articles

Subject Author Date
no connection if proxy configured on latest beta

06/22/2006 02:00
Re: no connection if proxy configured on latest be

06/24/2006 14:23
Re: no connection if proxy configured on latest be

06/25/2006 13:46
Re: no connection if proxy configured on latest be

06/25/2006 18:36




d

Created with FORUM 2.0.11