Replay HTTP with --output-http

Job: take captured requests and issue them against another host.

sudo gor --input-raw :8080 --output-http="http://staging.example.com"

From a file:

gor --input-file requests.gor --output-http="http://staging.example.com"

Host header

By default Gor replaces Host with the host from --output-http. Keep the original Host with --http-original-host. Setting --http-set-header "Host: other.example.com" also stops the automatic rewrite. HTTPS vs HTTP Host mismatches are a common 404 source — match the scheme and name staging actually serves. See rewriting.

Timeouts, redirects, TLS

gor --input-file requests.gor --output-http="http://staging.example.com" \
  --output-http-timeout 30s \
  --output-http-redirects 2 \
  --output-http-skip-verify
  • --output-http-timeout — request/response timeout (default 5s).
  • --output-http-redirects — follow this many redirects (default 0; origin clients already followed them).
  • --output-http-skip-verify — skip TLS hostname verify on the replay target.
  • --output-http-response-buffer — max response body kept (for middleware / files).
  • --output-http-track-response — send replayed responses to other outputs (stdout, file).

Basic auth on the target: --output-http "http://user:[email protected]" (overwrites any Authorization header on the original request).

Workers and queue

HTTP output uses a dynamic worker pool. --output-http-workers is the max (0 = unlimited). --output-http-workers-min is the min (default 1). Queue length: --output-http-queue-len (default 1000). Idle workers die after --output-http-worker-timeout (default 2s).

gor --input-file requests.gor --output-http="http://staging.example.com" --output-http-workers 20

There is no --output-http-stats flag in current source (old wiki). Use --stats for queue stats, and --output-tcp-stats when forwarding over TCP.

Filter before replay: filtering. Speed up a file: load testing.