relay: trigger close if in header read state with pending data
authorJo-Philipp Wich <jo@mein.io>
Tue, 2 Aug 2022 22:23:54 +0000 (00:23 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 2 Aug 2022 22:47:03 +0000 (00:47 +0200)
commit290ff883c69ac935ee3f22733d77d2a5a932f585
treee70a80dc6470273a8fd4e07a2f07cc77b4c0cff9
parent145a309c54b7a9ff46fc588783f58804c23b09ab
relay: trigger close if in header read state with pending data

In case a relay process exits without printing at least one newline,
relay_close_if_done() will not close the relay context because there's
still pending data in the ustream.

Extend the relevant condition to only consider pending data if the relay
context is not in the header parsing state anymore.

Without this fix, requests triggering such a behaviour will never conclude.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
relay.c