[AWS] Question about using AWS.
Ivan Kohan
ivan.kohan at gmail.com
Thu Oct 15 16:57:25 CEST 2009
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.htm
More information about the AWS
mailing list