Article delegate-en/717 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] Re: 6.1.0 - thank you, OS/2 Platform-specific bug, and correction
05 Mar 2000 21:34:46 GMT (Yutaka Sato)


On 03/05/00(04:28) you wrote
in <_A715@delegate-en.ML_>
 |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/*"
 |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 .

I suppose this problem has been in DeleGate/5.X or formers...

 |In order to correct this, I changed the code starting at line 1157 of httpd.c
 |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.

The code stuff at the point seems to need '/' at the top of URL-path
to get correct virtual URL by applying MOUNT reversely.  Such virtual
URL is necessary to be passed to CGI programs or to be sent in
special response messages to clients.
With your modification, I suppose you will get a wrong response for
a request like:


(instead of /WINDOWS/).  The generated "302 Moved" response message
will be with a Location header of an incorrect virtual URL.

I made a patch to cope with DOS-like path without introducing a new
problem (I hope so;).

*** ../../delegate6.1.0/src/httpd.c	Fri Mar  3 17:50:11 2000
--- httpd.c	Mon Mar  6 05:59:55 2000
*** 1179,1184 ****
--- 1179,1188 ----
  	path = dpath;
+ 	if( *path == '/' && isFullpath(path+1) ){
+ 		path += 1;
+ 		Verbose("## PATH=/[%s]\n",path);
+ 	}
  	Verbose("## UPATH=[%s]\n",upath);
  	if( search && Search || CGIonly ){

Yutaka Sato <>   @ @ 
Computer Science Division, Electrotechnical Laboratory      ( - )
1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan            _<   >_

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