Date:  05/22/2002 12:22:54 AM Msg ID:  000646
From:  FoxWeb Support Thread:  000640
Subject:  Re: Re: Re: Incomplete set of HTTP headers..
You are right in that the particular technique you are using will only work with the CGI version, but I believe that the following code will work with both the ISAPI and CGI modules in FoxWeb 2, as well as the CGI module in FoxWeb 1:
 
Html_out="Status: 302 Object Moved" + LF + ;
    "Location: http://www.foxweb.com/" + LF + LF

Basically, the ISAPI module cannot make assumptions regarding the status code it should use, so you must explicitly specify the 302, or 301 HTTP status codes.  You must also add the two line feed characters after the HTTP header.

FoxWeb Support Team
support@foxweb.com

Sent by Oleg Goncharuk on 05/21/2002 09:00:35 AM:
Regretfully, we cannot afford to use ISAPI because (and I had wrote about this once) CGI and ISAPI works differently in our case as follows:
 
We have to support older FoxWeb 1.29c on NT4 servers so we use scripts that works both on FoxWeb 2.x and 1.2x
 
Our older scripts contain code like this:
 
Html_out="Location: http://www.foxweb.com/"+chr(10)+chr(10)
return
 
This code works perfectly in 2.x CGI and doesn't work in 2.x ISAPI
 
This URL works (CGI):
 

http://www3.techsell.ru/velodrom/red.fwx

-------------------------------------------------------------------------------------------------------------

>GET /velodrom/red.fwx HTTP/1.1

>Host: www3.techsell.ru

>

<HTTP/1.1 302 Object Moved

<Location: http://www.foxweb.com/

<Server: Microsoft-IIS/5.0

<Content-Type: text/html

<Connection: close

<Content-Length: 145

<

<<head><title>Document Moved</title></head>

<<body><h1>Object Moved</h1>This document may be found <a HREF="http://www.foxweb.com/">here</a></body>Connection closed by for

<eign host.

------------------------------------------------------------------------------------------------------------------

And this one doesn't (ISAPI same code):

http://www3.techsell.ru/velodrom/red.fff

 

-----------------------------------------------------------------------------------------------------------

>GET /velodrom/red.fff HTTP/11

>Host: www3.techsell.ru

>

<HTTP/1.1 200 OK

<Server: Microsoft-IIS/5.0

<Date: Tue, 21 May 2002 16:08:23 GMT

<Location: http://www.foxweb.com/

<

-----------------------------------------------------------------------------------------------------------------

 

Sent by FoxWeb Support on 05/20/2002 10:53:32 AM:
We have seen this issue on another server and, just like in your case, the error only appeared once every couple of thousand requests.  In that particular case it appeared that foxweb.exe simply crashed before contacting the channel, so there was no danger of data corruption, or duplicate requests being processed after the user pressed the Refresh button.  We have tried duplicating the problem but were unable to do so on any of our servers.
 
The client who was experiencing this problem ended up switching to the ISAPI module (foxweb.dll), which did not exhibit the same behavior.  Is this a possibility in your case?  Since you are using IIS, it is recommended that you use the ISAPI module anyway.
 
FoxWeb Support Team
support@foxweb.com
Sent by Oleg Goncharuk on 05/20/2002 07:17:41 AM:
Very rarely (probability is less then 1/1000) we get following error on otherwise perfectly working scripts:
 
CGI Error
 
The specified CGI application misbehaved
by not returning a complete set of HTTP
headers. The headers that it did return are:
 
(then follows empty space)
 
After refresh script works perfectly again.
 
We use FoxWeb 2.11  CGI agent (EXE), VFP7, IIS5 on W2K server.
"Buffering" is set on.