Symantec LiveUpdate breaks squid.

From: Andrew Gillham <gillhaa@dont-contact.us>
Date: Fri, 10 Oct 1997 00:00:39 -0400 (EDT)

Hi,

A friend at work here has been trying to run Symantec's LiveUpdate
program through a Squid proxy server, and it is failing. LiveUpdate
is using a URL that looks like this:
ftp://cust-read:Rcus-01#@update.symantec.com/where/ever/

The '#' character causing the URL to be truncated. The code in icp.c
that truncates HTML anchors is what truncates it. Here is a patch
I've applied to allow this:

*** icp.c.orig Thu Aug 21 15:20:04 1997
--- icp.c Thu Oct 9 23:41:02 1997
***************
*** 1649,1656 ****
--- 1649,1662 ----
          *t = '\0';
      if ((t = strchr(url, '\r'))) /* remove CR */
          *t = '\0';
+
+ if ((t = strchr(url, '@'))) { /* look for ftp userid@host URL */
+ if ((t = strchr(t, '#'))) /* remove HTML anchors */
+ *t = '\0';
+ } else {
              if ((t = strchr(url, '#'))) /* remove HTML anchors */
                  *t = '\0';
+ }
      /* see if we running in httpd_accel_mode, if so got to convert it to URL */
      if (httpd_accel_mode && *url == '/') {
          /* prepend the accel prefix */

Then I discovered that 'ftpget' is stripping the leading '/' from ftp
URLs. Symantec's ftp server sets the CWD to /opt/something/other, and
the URL is ..@update.symantec.com/opt/something/other/file. The args
passwd to ftpget include '/opt/something/other/file', but ftpget strips
the leading '/' and tries to retrieve 'opt/something/other/file.'
Unfortunately with the CWD not being the root of the ftp area, an error
is returned. (file not found)

I'm not sure why ftpget strips the leading slash off, this seems very
much like a bug to me. Any ftp requests where the remote ftp server
doesn't set the CWD to '/', will inexplicitly fail.

-Andrew

-- 
-----------------------------------------------------------------
Andrew Gillham                            | This space left blank
gillham@whirlpool.com                     | inadvertently.
I speak for myself, not for my employer.  | Contact the publisher.
Received on Thu Oct 09 1997 - 21:01:30 MDT

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