Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

302 is ignored #10

Open
ReevesL opened this issue Feb 9, 2017 · 0 comments
Open

302 is ignored #10

ReevesL opened this issue Feb 9, 2017 · 0 comments
Labels

Comments

@ReevesL
Copy link

ReevesL commented Feb 9, 2017

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!

@sanathp sanathp added the bug label Feb 10, 2017
gepo added a commit to gepo/statusok that referenced this issue Mar 21, 2017
Add 2 options to request config:
 * redirectLimit - Limit for redirects performed while doing HTTP request
 * targetUrl - Expected request url after all redirects has been done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants