aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2019-08-25 13:26:40 +0200
committercbdev <cb@cbcdn.com>2019-08-25 13:26:40 +0200
commit4256eaae74f6f27167f84e2d469deaa3da3403bc (patch)
tree34183a1fb1d0579a152def9a96850805e8b002a3 /plugins
parentfadc42453aca482a9db4f5c92adf58d43d87cdc7 (diff)
downloadwebsocksy-4256eaae74f6f27167f84e2d469deaa3da3403bc.tar.gz
websocksy-4256eaae74f6f27167f84e2d469deaa3da3403bc.tar.bz2
websocksy-4256eaae74f6f27167f84e2d469deaa3da3403bc.zip
Fix minor bugs
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, ' ');