From 4256eaae74f6f27167f84e2d469deaa3da3403bc Mon Sep 17 00:00:00 2001 From: cbdev Date: Sun, 25 Aug 2019 13:26:40 +0200 Subject: Fix minor bugs --- plugins/backend_file.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/backend_file.c b/plugins/backend_file.c index 9976170..980a203 100644 --- a/plugins/backend_file.c +++ b/plugins/backend_file.c @@ -220,7 +220,11 @@ ws_peer_info query(char* endpoint, size_t protocols, char** protocol, size_t hea //read it for(line_length = getline(&line, &line_alloc, input); line_length >= 0; line_length = getline(&line, &line_alloc, input)){ memset(components, 0, sizeof(components)); - //TODO rtrim line + //rtrim line + p = strlen(line); + for(; p > 0 && !isprint(line[p]); p--){ + line[p] = 0; + } //read lines of host subproto framing framing-config components[0] = strchr(line, ' '); -- cgit v1.2.3