[prev in list] [next in list] [prev in thread] [next in thread] 

List:       twsocket
Subject:    [twsocket] HTTP server fix
From:       "Francois PIETTE" <francois.piette () overbyte ! be>
Date:       2003-10-31 18:52:19
[Download RAW message or body]

You can chane the start of ProcessRequest procedure as this:

procedure THttpConnection.ProcessRequest;
var
    I : Integer;
begin
    if (FPath <> '') and (FPath[1] = '/') then         <=== HERE
        FDocument := FDocDir + FPath
    else
        FDocument := FDocDir + '/' + FPath;       <==== AND HERE

This will avoid an exception and produce the 404 answer when an invalid
command has been sent.

--
francois.piette@overbyte.be
http://www.overbyte.be



-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic