Re: ftpget problem

From: Keith Heinemann <khman@dont-contact.us>
Date: Tue, 19 Aug 1997 09:07:50 -0500

> khman@neptune.new-era.net writes:
>
> >(using squid 1.1.14)
> >I've found that when using squid to access FTP sites, it doesn't properly
> >convert the FTP 'readme' file to valid HTML. For example,
> >ftp://tsx-11.mit.edu/ has some 'to get <file>.gz' entries. ftpget does
> >not escape the < and > symbols as per HTML spec, thus my browser (netscape
> >3) tries to interpret them. I don't know if there are also other symbols
> >that aren't being escaped correctly.
>
> Using XMP instead of PRE should fix that. Anyone have problems
> with that?

This technique works great, however the patch file supplied didn't fix my specific problem, namely ftp://tsx-11.mit.edu I
manually vi'd ftpget.c and changed all <PRE> tags to <XMP>, a tag I am not familiar with. This seems to work great. Is XMP
just like PRE, but somehow 'eXtreemly Mega Preformatted'?

                Thanks,
                  -keith

>
> Index: ftpget.c
> ===================================================================
> RCS file: /surf1/CVS/squid/src/Attic/ftpget.c,v
> retrieving revision 1.81.2.17
> diff -w -u -r1.81.2.17 ftpget.c
> --- ftpget.c 1997/07/09 19:35:37 1.81.2.17
> +++ ftpget.c 1997/08/18 23:12:50
> @@ -2129,12 +2129,12 @@
> fprintf(wfp, "<HR>\n");
> } else if (r->readme_fp && r->flags & F_BASEDIR) {
> fprintf(wfp, "<H4>README file from %s</H4>\n", r->title_url);
> - fprintf(wfp, "<PRE>\n");
> + fprintf(wfp, "<XMP>\n");
> while (fgets(buf, SMALLBUFSIZ, r->readme_fp))
> fputs(buf, wfp);
> fclose(r->readme_fp);
> r->readme_fp = NULL;
> - fprintf(wfp, "</PRE>\n");
> + fprintf(wfp, "</XMP>\n");
> fprintf(wfp, "<HR>\n");
> }
> fprintf(wfp, "<H2>\n");
>
>
> >
> >Also, (squid-users), is it possible to disaply ftpget from converting ftp
> >listings to HTMLscript? I believe the old harvest cached could, but I
> >can't seem to find how to do this under squid.
>
> >From the command line, yes, but not from Squid. If you leave
> off the -h option, ftpget will not convert to HTTP and HTML.
>
> Duane W.

---------------End of Original Message-----------------
Received on Tue Aug 19 1997 - 06:46:17 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:36:47 MST