Article delegate-en/715 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]

Newsgroups: mail-lists.delegate-en

[DeleGate-En] 6.1.0 - thank you, OS/2 Platform-specific bug, and correction
04 Mar 2000 19:28:47 GMT

Yutaka Sato,

Thank you for your work on Delegate - I find it an excellent and useful
networking tool. I am currently using Delegate as a translating proxy for
PDA web access, and for flexible temporary use on my firewall.

I have been one of your 'conservative users' of 5.x, but I have been looking
forward to 6.1.0 and the greatly improved manual - thanks again for that.

As soon as I noticed that 6.1.0 was available, I downloaded it, and built
it on my OS/2 machine.  I was pleased that the build went smoothly and without
trouble - a simple 'make CC=gcc' worked well.

In the course of testing the new build, however, I ran into a minor problem.
I was testing using delegate 6.1.0 as an HTTP origin server, and serving
from a directory on a different disk drive.   The command to start delegated

[D:\delegate]delegated -P8080 SERVER=http MOUNT="/* file:///e:/webpage/*"

(I already have an HTTPD on this box at port 80, hence the alternate port)

Any attempts to perform HTTPD gets on port 8080 led to a 404 file not found
error.  Running delegated with -vv on the command line, I noted that delegated
was attempting to open file (for instance) /e:/webpage/index.html .

And sure enough, when I added a printf just before the fopen at line 1231 in
httpd.c, I saw that we were trying to fopen "/e:/webpage/index.html". This
will fail in OS/2 - the leading slash is not allowed with the full path name.

In order to correct this, I changed the code starting at line 1157 of httpd.c

	Verbose("## PATH=[%s]\n",path);
	if( *path != '/' ){
		path = apath;

	Verbose("## PATH=[%s]\n",path);
	if( *path != '/' ){
		path = apath;
#ifdef __EMX__
        if(*(path+2)==':') path++;

I will admit to drinking beer while I was doing that, so I apologize for
the ugliness - basically, if the 3rd character in the path string is a ':',
then we make the leading slash go away.  This seems to fix the problem
here, though I haven't done serious production testing yet.

I did note that operation of delegated as an FTP server with a similar
syntax worked correctly, with no patches required:

[D:\delegate]delegated -P21 SERVER=ftp MOUNT="/* file:///i:/pub/*"

Can you think of other places where there might be a similar problem 
with OS/2 (and win) style filenames?



|  Derek J Decker            Decker Automation    |
|                     Tel/Fax: 000/000-0006          585 Winterhill Lane  |
|     Lexington, KY 40509  |

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]