Skip to content

Add: GET request support.#59

Open
chrisbliss18 wants to merge 2 commits intomasterfrom
add/get-support
Open

Add: GET request support.#59
chrisbliss18 wants to merge 2 commits intomasterfrom
add/get-support

Conversation

@chrisbliss18
Copy link
Copy Markdown
Contributor

Part of the Jetpack Monitor: Full Site Sight project.

Proposed changes

This change adds per-site HTTP check modes to Jetmon so checks can run as HEAD, GET, or COMPARE. The mode is fetched from jetpack_monitor_sites.check_mode, passed through the worker/native-addon boundary, and used by workers when scheduling requests.

In COMPARE mode, Jetmon performs the normal HEAD check for uptime determination and sends a parallel GET request only for observability. If the HEAD and GET results differ, the mismatch is logged with the truncated raw response headers. This is intended to help identify sites where HEAD handling differs from GET without changing current monitor behavior for those sites.

The native checker was updated to support optional GET requests and to return a small raw-response payload to the worker for compare-mode logging. Redirect parsing was kept compatible with existing behavior by reading through the full response headers before deciding whether to follow a redirect. Veriflier behavior remains HEAD-based.

Testing instructions

  1. Please verify the intended rollout and valid values for check_mode.
  2. Please confirm redirect behavior is still acceptable, especially when the redirect-follow limit is exceeded.
  3. Please review compare-mode logging volume and whether the current trace logging is sufficient or too noisy.
  4. Please focus testing on sites that behave differently for HEAD vs GET, plus redirect-heavy endpoints.

Added the ability to check sites using GET requests rather than HEAD.
There is also a mode to use both HEAD and GET requests, log details if
the results are different, and use the HEAD result for uptime/downtime.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant