Http Status Code

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
kevnad
Posts: 14
Joined: Thu May 26, 2011 11:13 am

Http Status Code

Post by kevnad »

Hi
I need to know if we can obtain all of the Status Code?

Like when we received a 403, I want to receive 403.7 for example.

thanks
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Http Status Code

Post by KS-Soft Europe »

The HTTP RFC doesn't define sub-codes (like 403.7). MS IIS uses HTTP status subcodes. When IIS return HTTP status code like 403.7 the status is logged on IIS (if failed-request tracing is configured). However the subcode 403.7 is never sent as part of the final response to the request. HTTP client receives HTTP/403 code.
So, IIS simply do not send HTTP subcodes to HostMonitor or any other HTTP client.
IIS also may return HTTP page with information about HTTP status subcode. This HTTP page content can be obtained using %HttpPage% macro-variable.

Please check the manual or visit our web site for more information about %HttpPage% macro-variable:
http://www.ks-soft.net/hostmon.eng/mfra ... #currmacro
kevnad
Posts: 14
Joined: Thu May 26, 2011 11:13 am

Post by kevnad »

thanks for the answer.

i have one more question. IF I received a 403, can I use the "Check Contents" of the Advanced options of the test?

The reason is that I can't have a client certificate because it is the only security of the web site and it is very sensitive. So I need to check if I get a 403 status code, and if possible, a 403.7. When I try in IE, I see that it is written "HTTP Error 403.7 - Forbidden: SSL client certificate is required." in the page. I want to add a condition that the page should contain 403.7. That way, if we have any other 403 sub code that might indicate a real problem, I want to put the test in a Bad status.

thanks
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

HostMonitor does not read "page data" when server responds with error HTTP code so you cannot use "Check contents" option.
However you may set "Normal" status when server respond with HTTP code 403. Set "Use Normal status if %HTTPCode%==403" option in Test Properties dialog.

Regards
Alex
kevnad
Posts: 14
Joined: Thu May 26, 2011 11:13 am

Post by kevnad »

thanks for the answer, we will go with the HTTP status code of 403.
Post Reply