Re: [htdig] ssl patch for ht://dig


Subject: Re: [htdig] ssl patch for ht://dig
From: Jeremy Lyon (jxlyon@uswest.com)
Date: Fri Nov 17 2000 - 12:56:28 PST


Gilles,

Thank you so much. That worked. Now I have a new problem. I am indexing from the local file system. Now
when I do a search everything works fine except the urls that are returned for the ssl sites appear like
this.

http://ecom.uswest:443/path

It's storing as a regular http:// instead of https:// and it's cutting off the .com. Any ideas.

Thanks
Jeremy

Gilles Detillieux wrote:

> According to Jeremy Lyon:
> > I'm trying to get this ssl patch to work. I finally installed all the
> > patch, but now I'm getting an error when compiling.
> >
> >
> > Server.cc: In method `Server::Server(char *, int, int, StringList * = 0)':
> > Server.cc:44: passing `const char *' as argument 1 of `String::operator =(char *)' discards qualifiers
> > make[1]: *** [Server.o] Error 1
> > make[1]: Leaving directory `/tmp/work/htdig-3.1.5/htdig'
> > make: *** [all] Error 1
> >
> > This is a line that was modified by the patch. Here is the excert from
> > Server.cc
> >
> >
> >
> > //
> > // Attempt to get a robots.txt file from the specified server
> > //
> > String url;
> > url = ssl ? "https://" : "http://"; <----this is where it's getting an error
> > url << host << ':' << port << "/robots.txt";
> > Document doc(url, 0);
> >
> > static int local_urls_only = config.Boolean("local_urls_only");
> > time_t timeZero = 0;
> > Document::DocStatus status;
> >
> > Here's the diff
> >
> > @@ -40,7 +40,8 @@
> > //
> > // Attempt to get a robots.txt file from the specified server
> > //
> > - String url = "http://";
> > + String url;
> > + url = ssl ? "https://" : "http://";
> > url << host << ':' << port << "/robots.txt";
> > Document doc(url, 0);
> >
> > Any ideas??????
>
> I'd try the following construct to see if it would keep your compiler happy:
>
> String url = "http://";
> if (ssl) url = "https://";
>
> This seems to be a compiler bug to me, as there shouldn't be a difference
> in the type of a single string literal or a ternary operator with two
> string literals as result. We have had reports before of some C++
> compilers choking on ternary operators, though, so we have tried to use
> them sparingly.
>
> --
> Gilles R. Detillieux E-mail: <grdetil@scrc.umanitoba.ca>
> Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/~grdetil
> Dept. Physiology, U. of Manitoba Phone: (204)789-3766
> Winnipeg, MB R3E 3J7 (Canada) Fax: (204)789-3930


------------------------------------
To unsubscribe from the htdig mailing list, send a message to
htdig-unsubscribe@htdig.org
You will receive a message to confirm this.
List archives: <http://www.htdig.org/mail/menu.html>
FAQ: <http://www.htdig.org/FAQ.html>



This archive was generated by hypermail 2b28 : Fri Nov 17 2000 - 13:04:16 PST