MINOR: http-ana: automatically enable http-no-delay for streaming events (SSE)
Some people get trapped using plain HTTP in AI gateway environments which
rely on server-sent events (SSE, documented at
https://html.spec.whatwg.org/multipage/server-sent-events.html).
This mechanism consists in pushing body updates and expecting intermediaries
not to buffer them. The way to detect this is to check the advertised
content-type in the response, which is "text/event-stream" in this case.
What happens by default is that the Nagle algorithm delays short messages
by up to ~200ms hoping to aggregate them. But when all messages are only
a few tens of bytes large, sent every 5-10ms, this shows a jerky traffic
that's not pleasant to use.
The current patch simply adds a check for the aforementioned content-type
on the response path, and automatically enables http-no-delay for sending
to the client when found. It's sufficient to address the case without
requiring the user to adjust the config, as measured with sse-latency: