sanathp / statusok

Monitor your Website and APIs from your Computer. Get Notified through Slack, E-mail when your server is down or response time is more than expected.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

302 is ignored

ReevesL opened this issue · comments

Hi,

I'm trying to monitor pages on a site which is configured to redirect a resource is unavailable. I found that when presented with a 302 (object moved) response, statusok happily follows the redirect. This means statusok will miss the event when a page goes down.

While I'm not trying to monitor my old blog, it can be used to repro:

  1. Set up monitoring for http://little.org/thisIsNotARealPage.htm as type "GET" with expected response code of 200
  2. Set up monitoring for http://little.org/thisIsNotARealPage.htm as type "GET" with expected response code of 302

Result: statusok reports success for the first item and failure for the second.
Expected: status okay should report failure for the first and success for the second.

Thanks for the cool tool!