Re: ftpget problem

From: Duane Wessels <wessels@dont-contact.us>
Date: Mon, 18 Aug 97 16:15:46 -0700

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?

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.
Received on Mon Aug 18 1997 - 16:19:01 MDT

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