proxy support doesn't work for `file:...' URLs

Larry Masinter ([email protected])
Sun, 1 May 1994 21:38:07 PDT


This seems a problem with all of the implementations:
The file:... URL is used both for local files and remote ones.

I'd like to support users who want to test out their HTML documents
via local files, but have them go thru the proxy server for non-local
files. However, if you set up file_proxy to be your proxy server, you
won't get local file access; if you don't, it won't try to proxy
access even when `file:' is treated as `ftp:'.

I've patched this in my local copies of Mosaic and lynx through a
rather ugly hack, and I'm not currently using the proxy version of
emacs (having proxy-ized that in a different way).

I suppose I wouldn't need to do this if there were a supported
URL localfile:... in all of the browsers; then we could deprecate
`file:' by just making it equivalent to `ftp:'.

================================================================

*** HTAccess.c.~1~ Mon Apr 11 11:57:34 1994
--- HTAccess.c Fri Apr 29 00:12:10 1994
***************
*** 246,252 ****
** (telnet sesssion started etc)
**
*/
! PRIVATE int HTLoad ARGS4(
CONST char *, addr,
HTParentAnchor *, anchor,
HTFormat, format_out,
--- 246,252 ----
** (telnet sesssion started etc)
**
*/
! PUBLIC int HTLoad ARGS4(
CONST char *, addr,
HTParentAnchor *, anchor,
HTFormat, format_out,
*** HTFile.c.~1~ Mon Apr 11 11:57:33 1994
--- HTFile.c Fri Apr 29 00:14:21 1994
***************
*** 17,22 ****
--- 17,23 ----
*/

#include "HTFile.h" /* Implemented here */
+ #include "HTAccess.h" /* used recursively */

#define INFINITY 512 /* file name length @@ FIXME */
#define MULTI_SUFFIX ".multi" /* Extension for scanning formats */
***************
*** 1265,1271 ****
/* Now, as transparently mounted access has failed, we try FTP.
*/
suicide:
! return HTFTPLoad(addr, anchor, format_out, sink);
}

/* Protocol descriptors
--- 1266,1279 ----
/* Now, as transparently mounted access has failed, we try FTP.
*/
suicide:
! { char * newname = 0;
! int result;
! StrAllocCopy(newname, addr);
! strncpy(newname+1, "ftp", 3);
! result = HTLoad(newname+1, anchor, format_out, sink);
! free(newname);
! return result;
! }
}

/* Protocol descriptors