|
From: Joe R. J. <jj...@cl...> - 2002-03-16 03:36:40
|
On Fri, 15 Mar 2002, Gilles Detillieux wrote:
> Date: Fri, 15 Mar 2002 18:36:06 -0600 (CST)
> From: Gilles Detillieux <gr...@sc...>
> To: jj...@cl...
> Cc: "ht://Dig developers list" <htd...@li...>
> Subject: Re: [htdig-dev] "file name.html" -> "filename.html";(
>
> According to Joe R. Jah:
> > I misunderstood. Here is the patch:
> > -------------------------------------8<-------------------------------------
> > *** htlib/URL.cc.031202 Thu Feb 7 17:15:38 2002
> > --- htlib/URL.cc Fri Mar 15 15:25:27 2002
> > ***************
> > *** 74,82 ****
> > //
> > URL::URL(char *ref, URL &parent)
> > {
> > ! String temp(ref);
> > ! temp.remove(" \r\n\t");
> > ! ref = temp;
>
> Here's your error right here. You shouldn't have deleted that third
> line, only the first two. The last one is needed because the constructor
> then uses the ref pointer to walk through the cleaned up URL string.
> You should set ref = temp; right after the close of the while loop
> below.
...
> You need...
>
> ref = temp;
>
> here, after the loop. Without it, ref is still pointing to the end of
> the original URL, not the start of the cleaned up one, so the rest of
> the code will think it got an empty string as a URL.
...
> The second section, in URL::parse() looks fine to me, because in there,
> there were only two lines that you removed at the start, and you left
> the assignment of temp to nurl.
Thank you Gilles I corrected the patch and placed it in the patch site:
ftp://ftp.ccsf.edu/htdig-patches/3.1.6/fileSpace.1
I believe this patch is safer than the fileSpace.0 because it does not
leave any space in the URL; besides, its use is optional. I switch back
my vote to +1;)
To apply save it to your srver, change to htdig-3.1.6 source directory,
and run: patch -p0 < /patch/to/fileSpace.1
> We'll make a programmer out of you yet, Joe. :-)
;-/
Regards,
Joe
--
_/ _/_/_/ _/ ____________ __o
_/ _/ _/ _/ ______________ _-\<,_
_/ _/ _/_/_/ _/ _/ ......(_)/ (_)
_/_/ oe _/ _/. _/_/ ah jj...@cl...
|