Henrik, I currently have an http test that is getting a "403 Forbidden" response. Hobbit is not marking this as an error. Would it be possible to have Hobbit treat a "Forbidden" response as an error and alert on it?
Thanks, Larry Barber
Larry Barber a écrit :
Henrik, I currently have an http test that is getting a "403 Forbidden" response. Hobbit is not marking this as an error. Would it be possible to have Hobbit treat a "Forbidden" response as an error and alert on it?
Hi
in bbnet/httpresult.c there's this :
switch(status) { case 000: /* transportlayer reports error */ result = (h->dialup ? COL_CLEAR : COL_RED); break; case 100: /* Continue - should be ok */ case 200: case 201: case 202: case 203: case 204: case 205: case 206: case 301: case 302: case 303: case 307: case 401: case 403: /* Is "Forbidden" an OK status ? */ result = COL_GREEN; break; case 400: case 404: case 405: case 406: result = COL_RED; /* Trouble getting page */ break; case 500: case 501: case 502: /* Proxy error */ case 503: case 504: case 505: result = COL_RED; /* Server error */ break;
You can modify it and rebuild your Hobbit server.
--
Frédéric Mangeant
Steria EDC Sophia-Antipolis
On Fri, Jun 09, 2006 at 08:25:53AM -0500, Larry Barber wrote:
Henrik, I currently have an http test that is getting a "403 Forbidden" response. Hobbit is not marking this as an error. Would it be possible to have Hobbit treat a "Forbidden" response as an error and alert on it?
Since Frederic has already been quoting my source-code, I guess it's evident that I have been in doubt about this particular error code.
The reason it does not cause a yellow or red status is that "Forbidden" is a common result when testing websites that require authentication. Your Hobbit server may not have the required authentication, and in that case a red status because of a 403 error would be misleading.
One could also argue that if the server is so much alive as to respond with a "Forbidden" status, then there is a fair chance that it is actually running OK.
So my suggestion is that if you must have a red status if you get a 403 status back, then implement a content-check and look for something in the response that must be present.
Regards, Henrik
participants (3)
-
frederic.mangeant@steria.com
-
henrik@hswn.dk
-
lebarber@gmail.com