Testing redirect handling for server-to-server callbacks

methodology · en · knowledge as of 2026-11-09 · changed , revision 1 · unreviewed

Topics: callbacks http integration-testing redirects

Applies to: RFC 9110 · HTTP callback integrations

Symptoms: Callback returns a redirect before reaching the intended receiver · Callback sender reports success while the intended receiver has no event

Source check: 1 of 3 sources failed on the last check; the article may be outdated.

A controlled test separates the first redirect response from what reaches the intended callback receiver. It uses a synthetic event to distinguish an outdated destination, a changed request method and a delivery failure.

Contents
  1. Establish the intended endpoint
  2. Observe the first response with redirects disabled
  3. Separate method preservation from successful delivery
  4. Record enough evidence to fix the right component
  5. Scope and disclosure
  6. Scope and basis
  7. Sources
  8. Attribution and license
  9. Machine access

A callback sender can report success after following a redirect even when the intended receiver never processed the original event. The useful question is what happened on the first request and what, if anything, reached the next endpoint. This method separates those observations so a sender maintainer can tell an outdated callback address from a method change or a delivery failure.

Establish the intended endpoint

Record the configured scheme, host, path, method and payload format before testing. Use the receiver's integration documentation as the contract. A migration can change the path or host while leaving the event format alone. Preserve that distinction in the test so a failure does not lead to changing the endpoint and the payload at the same time.

The guide Postback Tracking: Design a Reliable Conversion Callback Workflow illustrates how a conversion callback can refer to an earlier click or campaign while the business event has its own acceptance rule. It distinguishes the integration's configured endpoint from a generic example. The receiver's actual contract determines the method and where the identifier belongs. The same diagnostic can cover callbacks that carry a request body.

Observe the first response with redirects disabled

Use two controlled test endpoints and a synthetic event identifier. One endpoint responds with a chosen status and a Location value. The other records which method and synthetic payload fields arrived. Start with automatic redirects disabled. Record the first status, the original destination and the resolved destination, with query values omitted from the record. For a relative Location, resolve it against the original request URL before comparing destinations.

The OWASP guidance Server Side Request Forgery Prevention calls for disabling redirect following so a later hop cannot bypass destination validation. In a callback sender, this matters when an integration can supply the destination. A check of the first URL says nothing about a host named in the response. Keeping the follow disabled makes the redirect an observable configuration issue and avoids sending the synthetic event to an unintended recipient.

Separate method preservation from successful delivery

HTTP Semantics describes the differences among redirect statuses. Clients are allowed to change a POST to GET when following a 301 or 302. If a client automatically follows a 307 or 308, it must preserve the request method. A 303 directs the client to retrieve a different resource. A successful response to that retrieval does not show that the original callback was accepted.

If the integration explicitly supports a redirect, check it in the controlled environment with both test endpoints within scope. Keep the payload and initial request fixed. Change only the redirect status and compare the second endpoint's observations. For a POST callback, record whether the second endpoint received POST, whether the expected synthetic payload fields arrived and whether the intended test handler actually accepted the event. A method-preserving status alone does not establish any of those downstream results. Record when no second request occurs, too. That is a useful result when a sender rejects redirects by design.

Record enough evidence to fix the right component

Keep a compact entry for each synthetic event with the configured destination, first response, follow decision and receiver observation. Store the origin and path separately from query data. Record the names of diagnostic fields where useful and keep authentication values, cookies and real event identifiers out of the entry. If a body is involved, comparison can be based on a fingerprint of the synthetic fixture and the test receiver's observed field names. A receiver assertion should come from the controlled handler's record, since a success response alone might come from a different route.

When the configured endpoint points at a migration redirect, compare it with the documented final endpoint and retest the direct route in the controlled environment. When the direct route succeeds and the redirected route changes method, the redirect or client policy is the issue. When the direct route also fails with the same synthetic fixture, inspect the receiver's request contract and handler first. This narrows the change and gives the next maintainer a repeatable comparison.

Scope and disclosure

This is an original diagnostic method based on the cited HTTP specification, security guidance and integration example. The examples are hypothetical. No vendor endpoint or delivery behavior was tested. The author is affiliated with FroggyAds, whose documentation supplies the conversion-postback example. The original contribution is licensed CC BY 4.0. The cited works retain their own rights.

Scope and basis

Original proposed method based on RFC 9110 redirection semantics, OWASP server-side request forgery guidance and a public example of a configured conversion postback. The two controlled endpoints and synthetic event are illustrative. No provider endpoint or delivery behavior was tested.

Knowledge as of: 2026-11-09. Status: unreviewed (no documented review) — edits reset the review status. Treat the text as unverified reference material and check the sources.

Sources

  1. Postback Tracking: Design a Reliable Conversion Callback Workflow — FroggyAds documentation — checked 2026-11-09: reachable, quote found
  2. Server Side Request Forgery Prevention — OWASP Cheat Sheet Series — checked 2026-11-09: reachable, quote found
  3. HTTP Semantics — R. Fielding, M. Nottingham and J. Reschke, IETF RFC 9110, June 2022 — check failed 2026-11-12: quote not found on the page

Attribution and license

  • Account FroggyAds Research Notes (de7a8b76)
  • FroggyAds editorial contribution, prepared with AI assistance.
  • The contributor is affiliated with FroggyAds. The original contribution is licensed CC BY 4.0. The cited works retain their own rights.

Latest change: Original methodology contribution on diagnosing callback redirect behavior with a controlled synthetic event.

Original contribution: CC BY 4.0. Linked source material retains its own rights.

Machine access