> 
> From: Thomas Lussnig <[EMAIL PROTECTED]>
> Date: 2002/06/13 Thu AM 02:33:04 EDT
> To: Herold Heiko <[EMAIL PROTECTED]>
> CC: [EMAIL PROTECTED]
> Subject: Re: windows binary
> 
> > Lately there was some discussion on the list riguarding ssl and proxies.
> > 
> > Anyone can confirm this to be a problem with that binary compiled for
> > windows with msvc, against a more general problem with the cvs sources from
> > yesterday ?
> Hi,
> i could not test it because i have no proxy.
> But after a fast look in the code, i would say definitly yes.
> Last change 18.5, becasue ssl is established only bevore the connection 
> or not after an initial handshake. The other guy say he would look at 
> it. But i it take to long i can also take an look at at.
> 

I need it, so here is my quick fix. (I know it is not good, but it works)

diff wget-1.8.2/src/http.c.org wget-1.8.2/src/http.c

844a845,882
> /* quick and dirty hack to get https over http proxy to work */
>   if (proxy && !memcmp("https://";, full_path, 8)) {
>       fd_set rfds;
>       struct timeval tv[1];
>       sprintf (request, "%s %s:%d HTTP/1.0\r\n\r\n",
>               "CONNECT", u->host, u->port);
>       num_written = iwrite (sock, request, strlen (request));
>       if (num_written < 0) {
>               logprintf (LOG_VERBOSE,
>               _("Failed writing HTTP request: %s.\n"),
>                strerror (errno));
>               CLOSE_INVALIDATE (sock);
>               return WRITEFAILED;
>       }
>       while (-1) {
>               int n;
>               char buff [4096];
>               FD_ZERO(&rfds);
>               FD_SET(sock, &rfds);
>               tv->tv_sec = 1; tv->tv_usec = 0;
>               n=select(sock + 1, &rfds, 0, 0, tv);
>               if (0 ==n) break; /* no more data */
>               n=recv(sock, buff, 4096, 0);
>               if (n>2 && n<4096 && !memcmp(buff+n-2,"\n\n", 2))
>               break; /* end of header whatever it is */
>        }
>        if (connect_ssl (&ssl, ssl_ctx,sock) != 0)
>        {
>          logputs (LOG_VERBOSE, "\n");
>          logprintf (LOG_NOTQUIET,
>               _("Unable to establish SSL connection.\n"));
>          ssl_printerrors ();
>          CLOSE (sock);
>          return CONSSLERR;
>        }
>         full_path = url_full_path (u);
>         conn = u;
>   }

Attachment: smime.p7s
Description: application/pkcs7-signature

Reply via email to