aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/backend_file.c6
1 files changed, 5 insertions, 1 deletions
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, ' ');