Date:  01/11/2015 04:42:02 AM Msg ID:  004766
From:  Joël Thread:  002172
Subject:  Re: Status code = 200 when it should be 500
 
Hi
 
Is there an update of this ?
 
I receive data from external server using http post.   If the error below occurs, the remote machine gets a 200 status and considers that the data is received.
It is not an usual situation but it just happened today during a maintenance on the server and data was lost.
 
Kind regards
Joël.
 
Sent by FoxWeb Support on 08/15/2004 12:04:24 PM:
The status code of all messages returned by FoxWeb is 200.  I understand your point and we will look into changing this behavior.  On the meantime, one possibility would be for you to create a script that returns a specific string (or even a status code other than 200, using Response.Status).  You should then configure your monitoring software to call this script.  If the response does not match the expected text reply, or status code, your software should alert you as necessary.

FoxWeb Support Team
support@foxweb.com email

Sent by David Hempy on 08/12/2004 08:04:22 PM:
We've got a problem on one of our servers with socket connections failing.  This has nothing to do with FoxWeb, except that FoxWeb occasionally can't make socket connections.  Our Perl scripts and other programs exhibit the same problem, so we're certain the source is external to FoxWeb and Perl.
 
My inquiry has nothing to do with sockets.  The issue I'm writing about is the status codes that foxweb.exe returns when it can't connect to the broker.  I can stop the FoxWeb service, and a hit to and FoxWeb page returns:

FoxWeb Message

The FoxWeb Service has returned the following message:
Could Not Connect to FoxWeb Broker.
Broker has probably not been started.

However, the HTTP status code returned was 200, indicating a successful page.  This makes detecting problems in our monitoring software more challenging.  It would be far more appropriate if foxweb.exe returned a 500-level error, indicating a server error.

Now I could do a page-scrape for the word "error" or something, but that's not a good approach, as my own code often prints what it calls "errors" in user input, or a user might even use the word "error" in a dynamic page title.

 

Even worse, it doesn't catch the problem that I'm actually trying to detect at the moment:


FoxWeb Message

The FoxWeb Service has returned the following message:

Could not Create Socket

The word "error" never appears on that page.  I haven't been able to capture the status code from this page yet (our socket problem is sparodic), but I'm guessing it will be 200, given that the other error page I cited returns a 200.

Can you tell me what status code the "Could not create socket" page returns? 

I really can't wait for an update to foxweb.exe on this problem, so I'll be screen-scraping this one for "Could not Create Socket".  I encourage you to put it on the short list for the next release, or even an interim patch.  I'm guessing it would be pretty simple to implement.

 

-dave

ps.  Let me reiterate: Our socket problem is not caused by FoxWeb in any way.  Don't mistake this message as a complaint about FoxWeb's socket usage...FoxWeb is fine.  FoxWeb is the victim of some other errant situation on our server.

 

 

--
David Hempy
Internet Database Administrator
Kentucky Educational Television
(859)258-7164  -  (800)333-9764