Hi,
I have the following test installation on HA-Proxy version 2.2.4-1ppa1~bionic 2020/10/02:
defaults
log global
mode http
option httplog
option dontlognull
timeout connect 5000
timeout client 50000
timeout server 50000
timeout http-keep-alive 2m
frontend test_tcp80
bind 10.220.44.3:80
option http-keep-alive
default_backend test_tcp80
backend test_tcp80
balance source
option prefer-last-server
option http-keep-alive
server iris 10.220.38.3:8001
I create http1.1 request. Request from client consists header ‘Connection: keep-alive’, but request from Haproxy to backend without this header.
Is this a bug or feature? It works as expected on 1.9. How can I solve this problem?
Thank you!
It’s not a problem. HTTP/1.1 implies Connection: keep-alive
, it therefor doesn’t make sense to set this header in HTTP/1.1.
@lukastribus Can I chime in here?
I have a (indeed very) bogus WebOS (LG SmartTVs) application for streaming that needs this damn header. (for H1 non-TLS connections)
My issue is with any modern (branches 2.4…2.6) version not only removes the connection
header from the outgoing response but doesn’t even allow me to insert it manually:
http-response set-header connection “keep-alive”
Is completely ignores it.
Shouldn’t this last-resort option (adding manually) be allowed? On the HTX conception era, the h1-case-adjust..
feature was added to address this kind of broken apps, right?
You can try http-after-response but I’m not sure if this will do it.
Hi @lukastribus thanks for the reply. Just tried it. It doesn’t work also.
This is the main point of issue with this behavior: that the frontend is actively (and silently) removing it before sending the response to the client, even if manually added for a bogus app. My concern is that there’s no apparent workaround for this if really needed.
Correct, if http-after-response
doesn’t work, then there is no workaround indeed.
Hi @lukastribus, so…the question becomes: Does this sound like a feature-request?
I know it seems dumb, with without it this bogus streaming app won’t work properly
You can try filing a feature request, but I honestly doubt that this will be integrated.
I would focus on getting the root cause fixed.