Article delegate-en/718 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[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:49:50 GMT pzmbabdyi-e6yerogm2xtr.ml@ml.delegate.org


>  |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...

Yes, I _had_ seen this before, but had not attempted a fix.
 
>  |In order to correct this, I changed the code starting at line 1157 of httpd.c
>  |from:
> ...
>  |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:
> 
>   GET /WINDOWS HTTP/1.0
> 
> (instead of /WINDOWS/).  The generated "302 Moved" response message
> will be with a Location header of an incorrect virtual URL.

That's what I get for trying to modify code that I am not very familiar
with while drinking beer - after three Red Seal Ales, it's a wonder I
didn't destroy they entire program!

Let this be a lesson to you kids out there - Don't Drink And Code!
 
> 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

I have replaced my excresence with your patch, and it appears to be working
nicely.  Thank you.

-Derek



--
+-------------------------------------------------------------------------+
|  Derek J Decker        pzmbabdyi-e6yerogm2xtr.ml@ml.delegate.org            Decker Automation    |
|                     Tel/Fax: 000/000-0006          585 Winterhill Lane  |
|             http://www.iglou.com/DeckerAutomation  Lexington, KY 40509  |
+-------------------------------------------------------------------------+


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