From dmiles@teknowledge.com Fri Jun 22 10:08:25 2001
Received: from helium.teknowledge.com (promethium.teknowledge.com [128.136.192.50])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f5M88Oc18165
	for <prolog@swi.psy.uva.nl>; Fri, 22 Jun 2001 10:08:24 +0200 (MET DST)
Received: by helium.teknowledge.com with Internet Mail Service (5.5.2653.19)
	id <NKJ6MVGK>; Fri, 22 Jun 2001 01:02:26 -0700
Message-ID: <EE25484266A64A47AE06CFC47C64232B4039B7@helium.teknowledge.com>
From: "Douglas R. Miles" <dmiles@teknowledge.com>
To: "Michael A. Covington" <mc@ai.uga.edu>, prolog@swi.psy.uva.nl
Subject: RE: [SWIPL] eof_action of current input stream
Date: Fri, 22 Jun 2001 01:00:35 -0700
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain;
	charset="iso-8859-1"

Michael,

On this thread..

I am interested in using SWI under Windows 2000 Webserver (IIS 5) .. 

There are two methods I am using right now but am interested in hearing your
approach. 

Did you use ASAPI Filters or another method?

Douglas



> -----Original Message-----
> From: Jan Wielemaker [mailto:jan@swi.psy.uva.nl]
> Sent: Thursday, June 07, 2001 1:26 PM
> To: Michael A. Covington; prolog@swi.psy.uva.nl
> Subject: Re: [SWIPL] eof_action of current input stream
> 
> 
> > OK, another question relating to CGI scripting.
> > 
> > I've got SWI Prolog 4.05 running as a CGI script engine 
> under Windows 2000's
> > web server.  So far so good.
> > 
> > Now I'm trying to get input into it using the POST method 
> (i.e., standard
> > input).
> > 
> > Windows sends it a string that does not end with an 
> end-of-line mark.
> 
> No, but as far as I know, CGI's are passed the environment variable
> CONTENT_LENGTH, indicating the number of bytes you must read from the
> standard input.
> 
> I've just extended set_stream/2 to allow controlling the buffering
> of open streams, but it appears it would be a good idea to add some
> more (binary/text mode, eof_action).
> 
> > And the eof_action for console input is eof_action(reset), 
> so I can't detect
> > the end-of-file condition -- instead, SWI Prolog waits 
> forever for more
> > characters to be typed.
> 
> You can still detect the end-of-file, as it returns -1.  
> 
> 	--- Jan
> 
> P.s.	The libc package contains cgi.c.  In my internal release I've
> 	added this to the standard suite for Windows too (it was already
> 	in the Unix version).  If you want I can send you the DLL (it
> 	hasn't really been tested on Windows I'm afraid).
> 
> 
> ----------------
> * To UNSUBSCRIBE, please use the HTML form at
> 
>     
> http://www.swi.psy.uva.nl/projects/SWI-Prolog/index.html#mailinglist
> 
> or send mail to prolog-request@swi.psy.uva.nl using the 
> Subject: "unsubscribe"
> (without the quotes) and *no* message body.
> 
> ** An ARCHIVE of this list is maintained at
> 
>     http://www.swi.psy.uva.nl/projects/SWI-Prolog/mailinglist/archive/
> 
> 
> 

