From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,27c24ba68e621eef X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news2.google.com!proxad.net!193.252.118.146.MISMATCH!news.wanadoo.fr!news.wanadoo.fr!not-for-mail Sender: obry@PASCAL Newsgroups: comp.lang.ada Subject: Re: AWS applications and domain hosting References: From: Pascal Obry Date: 30 Jun 2005 22:45:01 +0200 Message-ID: Organization: Home - http://www.obry.net User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Date: 30 Jun 2005 22:45:13 CEST NNTP-Posting-Host: 82.120.157.150 X-Trace: 1120164313 news.wanadoo.fr 3112 82.120.157.150:3341 X-Complaints-To: abuse@wanadoo.fr Xref: g2news1.google.com comp.lang.ada:11784 Date: 2005-06-30T22:45:13+02:00 List-Id: "Randy Brukardt" writes: > > a) You don't have to implement plain handing out of static files > > yourself. > > That's such a trivial task (assuming that AWS includes appropriate handling > of HTTP commands) that's it's pretty silly not to include it and avoid extra > failure points. This is indeed one of the AWS example. A static file server is built in AWS using a 10 lines procedure callback: << function Get (Request : in AWS.Status.Data) return AWS.Response.Data is URI : constant String := AWS.Status.URI (Request); Filename : constant String := URI (2 .. URI'Last); begin if OS_Lib.Is_Regular_File (Filename) then return AWS.Response.File (Content_Type => AWS.MIME.Content_Type (Filename), Filename => Filename); else return AWS.Response.Acknowledge (Messages.S404, "

Page '" & URI & "' Not found."); end if; end Get; >> This handles the 404 message too. Note that such routine is provided by AWS, see AWS.Services.Page_Server. If this is not sufficient there is another hight level service which also handles directory browing, see AWS.Services.Directory. Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net --| "The best way to travel is by means of imagination" --| --| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595