﻿# Diagnose a misdirected request on a reused connection

A reused transport connection still needs correct authority routing; reproduce the pool sequence before changing model settings.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/guide-http-421-authority/
Language: en

An inference client works with a fresh connection but intermittently receives a misdirected-request response after connection reuse. The model and credentials may be unchanged. A connection shared across authorities can reach a server that is unwilling or unable to answer for the requested authority. Investigate virtual-host selection and connection policy before changing the generation payload.

## Keep authority and connection distinct

A hostname in the request identifies the intended authority. The existing connection is only the transport path used to reach it. Multiplexed HTTP can reuse a connection under defined conditions, but shared transport does not erase authority boundaries. Compare the requested scheme and authority, TLS peer identity and actual network destination. A certificate valid for several names does not independently prove that every backend accepts every one of those names.

## Reproduce reuse rather than random retries

Construct a test using authorized endpoints and synthetic requests. First call the target through a new connection, then reproduce the application's normal connection-pool sequence. Record connection identity and the authority of each request without logging credentials. A successful fresh request and failed reused request narrow the hypothesis. They do not yet identify whether the client, edge or backend configuration is responsible, so preserve the exact sequence for comparison.

## Trace routing at each hop

At the public edge, inspect the virtual-host mapping and what authority is forwarded upstream. At an internal proxy, inspect its pool key and upstream TLS configuration. A pool keyed too broadly can combine destinations that require different routing context. Conversely, an overly narrow pool can hide the problem by avoiding reuse while wasting connections. The repair should align authority handling, rather than merely forcing every request to reconnect.

## Treat the response as routing evidence

The misdirected-request status has specific HTTP semantics and can allow another attempt over a different connection. Still apply the application deadline and attempt limit. Preserve whether the response came before any model admission. Do not copy the same generation to arbitrary backup origins merely because a routing error occurred. A new connection to the intended authority and a new provider route are different actions with different trust and duplicate-work implications.

Compare the authority seen at the edge with the authority used for its upstream TLS connection. A correct external certificate can coexist with an incorrect internal virtual-host mapping. The reproduction should retain both views so a successful public handshake does not prematurely close the routing investigation.

## Confirm the corrected boundary

Repeat the failing pool sequence, test each authorized hostname and keep requests concurrent enough to exercise the real reuse behavior. Confirm that credentials remain scoped to the intended destination. Also validate normal response parsing and stream completion; fixing authority selection does not verify the full inference contract. Acceptance means the routing layer consistently serves the requested authority under reuse, with a bounded recovery when the peer explicitly rejects that path. It makes no claim that all names sharing a certificate offer equivalent models or identical service policies.

## Primary references

[HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html). Defines the misdirected-request status and authority semantics.

[HTTP/2](https://www.rfc-editor.org/rfc/rfc9113.html). Explains connection reuse, authority checks and multiplexed requests.

[HTTP/1.1](https://www.rfc-editor.org/rfc/rfc9112.html). Explains connection management for comparison with the fresh HTTP path.

Related reading: [Server returns the wrong certificate: SNI, SAN and the default virtual host](/journal/tls-sni-san-wrong-certificate/); [OpenRouter base URL: configuring a compatible client](/journal/openrouter-base-url/).
