reyk / relayd

OpenBSD relayd daemon -experimental
Other
78 stars 11 forks source link

relay http persistent connection #10

Closed paulfariello closed 5 years ago

paulfariello commented 8 years ago

I can't have relayd relaying relaying an HTTP persistent connection (Connection: keep-alive) to two differents destination.

I'm using the following configuration:

table <srv1> { 127.0.0.1 }
table <srv2> { 127.0.0.1 }

http protocol "httpfilter" {
    return error
    match url "www.example.org/" forward to <srv1>
    match url "www.example.org/api/" forward to <srv2>
}

relay www {
    listen on 127.0.0.1 port 80
    protocol httpfilter

    forward to <srv1> port 8080 check tcp
    forward to <srv2> port 8181 check tcp
}

Then I test with the following command:

curl http://www.example.org http://www.example.org/api/

And I have the following logs in relayd:

relay www, session 1 (1 active), 0, 127.0.0.1 -> 127.0.0.1:8080, done, GET GET

And in fact, I receive two response from the same destination. The first one (i.e. 127.0.0.1:8080)

reyk commented 5 years ago

This has been fixed in -current