Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

propertyTsmAsyncTLSServer.PlainTextRedirectPort

property PlainTextRedirectPort: Word read fPlainPort write SetPlainPort default 0;
OPTIONAL PLAINTEXT REDIRECT LISTENER. 0 (the default) means the server listens for TLS only, which is what it has always done. A non-zero port - 80, in practice - opens a SECOND listener that speaks no TLS at all: it accepts, reads one short request, hands the bytes to whichever registered protocol implements iAppPlainTextRedirect, and closes.

IT EXISTS SO A DEPLOYMENT DOES NOT NEED A SECOND HTTP STACK to answer "http://" with a 301. Nothing accepted here is given to the reactor, to an engine shard, or to a session; there is no handshake and no keep-alive, and a connection that has not delivered a request within a few seconds is dropped.

WHO ANSWERS is decided by the existing rules, not by a new one: the connection carries no ALPN, so ResolveProtocol('') applies FallbackPolicy with AlpnPriority ordering the candidates. FallbackPolicy defaults to fbpRefuse, so simply setting this port does NOT by itself make the server answer - a deployment must also say which protocol handles the un-negotiated case, which for HTTP means marking the HTTP/1.1 plugin IsFallbackProtocol and setting FallbackPolicy := fbpUseFallback. That is deliberate: silently serving whatever sorted first is the defect the ALPN ordering work removed, and this must not reintroduce it from the plaintext side.

Changing it while Active raises, like the other listener properties.