[AWS] AWS Digest, Vol 53, Issue 2

Ivan Kohan ivan.kohan at gmail.com
Fri Oct 16 15:34:34 CEST 2009


Thank you for your help!

I have carefully read all messages and sent them to my friend.
That's what turned out to be.
The fact is that my friend has a router that directs external requests to
the server and router port 8080 was closed, so locally on the server
firewall missed, but the router did not miss external requests.
Now, my friend changed the router settings and all to work.

Sincerely, Ivan


2009/10/16 <aws-request at lists.adacore.com>

> Send AWS mailing list submissions to
>        aws at lists.adacore.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        /no-more-mailman.html
> or, via email, send a message with subject or body 'help' to
>        aws-request at lists.adacore.com
>
> You can reach the person managing the list at
>        aws-owner at lists.adacore.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of AWS digest..."
>
>
> Today's Topics:
>
>   1. Question about using AWS. (Ivan Kohan)
>   2. Re: Question about using AWS. (Pascal Obry)
>   3. Re: Question about using AWS. (Dmitriy Anisimkov)
>   4. Re: Question about using AWS. (Pascal Obry)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 15 Oct 2009 17:57:25 +0300
> From: Ivan Kohan <ivan.kohan at gmail.com>
> Subject: [AWS] Question about using AWS.
> To: aws at lists.adacore.com
> Message-ID:
>        <7b498b8e0910150757v68a7c420nfbeae97097d75b5a at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hello All!
>
> Please help me understand the situation.
> At the moment, I wrote an application that uses the library AWS.
>
> When testing on my local computer (WindowsXP), it is quite normal
> application responds to the URL: http://localhost:8080/main
>
> Yesterday I posted my application, without changes to the server my friend.
> He installed WindowsXP with the standard Windows firewall.
> I expect that the application will respond to the URL:
> http://screamer.kiev.ua:8080/main
>
> However, no response to the URL: http://screamer.kiev.ua:8080/main no.
> At the same time, when my friend asks for your server
> http://localhost:8080/main him as everything works.
>
> I checked telnet to port 8080 - I see that the port is open.
>
> Maybe I have something incorrectly stated in the code your application?
>
> Help please understand if there are any mistakes in my code and how to make
> my application to respond to the URL http://screamer.kiev.ua:8080/main
>
> I would be very grateful for the help.
> Sincerely, Ivan Kohan
>
> Here is the code of the main module:
>
> ---------------------------------------------------------------------------------------
> with Ada.Text_IO; use Ada.Text_IO;
>
> with AWS.Response;
> with AWS.Server;
> with AWS.Status;
> with AWS.Utils;
> with AWS.MIME;
> with AWS.Parameters;
>
> with Dates;       use Dates;
> with Xiumen;      use Xiumen;
> with Globalvar;   use Globalvar;
>
> procedure Main is
>   *WS : AWS.Server.HTTP;*
>   package IO_Integer is new Integer_IO(Integer); use IO_Integer;
>
>   InYear    : TypeOfYear    := 1910;
>   InMonth   : TypeOfMonth   := 1;
>   InDay     : TypeOfDay     := 1;
>   InHour    : TypeOfHour    := 0;
>   InMinutes : TypeOfMinutes := 0;
>
> *   function HW_CB (Request : in AWS.Status.Data) return AWS.Response.Data
> is
>      URI      : constant String := AWS.Status.URI (Request);
>      Filename : constant String := "./img" & URI;
>   begin
>      if    URI = "/main"  then
>         InYear := 2010;
>         InMonth := 03;
>         InDay := 24;
>         InHour := 14;
>         InMinutes := 30;
>
>         XiumenStart(InYear, InMonth, InDay, InHour, InMinutes);
>         return AWS.Response.Build ("text/html", XiumenInput);
>      elsif AWS.Utils.Is_Regular_File (Filename) then
>         return AWS.Response.File
>           (Content_Type => AWS.MIME.Content_Type (Filename),
>            Filename     => Filename);
>      else
>         return AWS.Response.Build ("text/html", XiumenAttention);
>      end if;
>   end HW_CB;*
>
> begin
> *   AWS.Server.Start (WS, "Main", CallBack => HW_CB'Unrestricted_Access);
>   AWS.Server.Wait;*
> end Main;
>
> ---------------------------------------------------------------------------------------
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: /pipermail/aws/attachments/20091015/f466f513/attachment.html
>
> ------------------------------
>
> Message: 2
> Date: Thu, 15 Oct 2009 17:37:21 +0200
> From: Pascal Obry <pascal at obry.net>
> Subject: Re: [AWS] Question about using AWS.
> To: aws at lists.adacore.com
> Message-ID: <4AD741B1.6000909 at obry.net>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Ivan,
>
> > I would be very grateful for the help.
>
> This is because by default AWS bind to localhost. To bind to
> "screamer.kiev.ua" (which is known to the outside) you need to either
> use a config object and set the host (AWS.Config.Set.Server_Host) or add
> a line in aws.ini:
>
> <<
> server_host screamer.kiev.ua
>  >>
>
> Pascal.
>
> --
>
> --|------------------------------------------------------
> --| Pascal Obry                           Team-Ada Member
> --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
> --|------------------------------------------------------
> --|    http://www.obry.net  -  http://v2p.fr.eu.org
> --| "The best way to travel is by means of imagination"
> --|
> --| gpg --keyserver keys.gnupg.net --recv-key F949BD3B
>
>
>
> ------------------------------
>
> Message: 3
> Date: Fri, 16 Oct 2009 10:14:40 +0700
> From: Dmitriy Anisimkov <anisimkov at ada-ru.org>
> Subject: Re: [AWS] Question about using AWS.
> To: pascal at obry.net
> Cc: aws at lists.adacore.com
> Message-ID: <4AD7E520.5000103 at ada-ru.org>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Pascal Obry wrote:
> > Ivan,
> >
> >
> >> I would be very grateful for the help.
> >>
> >
> > This is because by default AWS bind to localhost.
> Pascal,
>
> AWS should connect to all available IP addresses on the host computer by
> default.
> I do not see default bind to localhost in the source codes, do you ?
> The Server_Host is empty by default.
> Empty Host in Bind call mean Any_Inet_Addr.
> -----------------------
>      if Host = "" then
>         Inet_Addr := Sockets.Any_Inet_Addr;
> -----------------------
>
> I think Ivans friend did not make correct host computer configuration.
>
> >  To bind to
> > "screamer.kiev.ua" (which is known to the outside) you need to either
> > use a config object and set the host (AWS.Config.Set.Server_Host) or add
> > a line in aws.ini:
> >
> > <<
> > server_host screamer.kiev.ua
> >  >>
> >
> > Pascal.
>
>
> ------------------------------
>
> Message: 4
> Date: Fri, 16 Oct 2009 08:03:11 +0200
> From: Pascal Obry <pascal at obry.net>
> Subject: Re: [AWS] Question about using AWS.
> To: Dmitriy Anisimkov <anisimkov at ada-ru.org>
> Cc: aws at lists.adacore.com
> Message-ID: <4AD80C9F.8060803 at obry.net>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Le 16/10/2009 05:14, Dmitriy Anisimkov a ?crit :
> > AWS should connect to all available IP addresses on the host computer by
> > default.
>
> Oops you are right.
>
> > I think Ivans friend did not make correct host computer configuration.
>
> I see no other explanation then.
>
> Pascal.
>
> --
>
> --|------------------------------------------------------
> --| Pascal Obry                           Team-Ada Member
> --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
> --|------------------------------------------------------
> --|    http://www.obry.net  -  http://v2p.fr.eu.org
> --| "The best way to travel is by means of imagination"
> --|
> --| gpg --keyserver keys.gnupg.net --recv-key F949BD3B
>
>
>
> ------------------------------
>
> _______________________________________________
> AWS mailing list
> AWS at lists.adacore.com
> /no-more-mailman.html
>
>
> End of AWS Digest, Vol 53, Issue 2
> **********************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/aws/attachments/20091016/ae07338a/attachment.htm 


More information about the AWS mailing list