diff options
author | cbdev <cb@cbcdn.com> | 2019-08-25 13:26:40 +0200 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2019-08-25 13:26:40 +0200 |
commit | 4256eaae74f6f27167f84e2d469deaa3da3403bc (patch) | |
tree | 34183a1fb1d0579a152def9a96850805e8b002a3 /plugins | |
parent | fadc42453aca482a9db4f5c92adf58d43d87cdc7 (diff) | |
download | websocksy-4256eaae74f6f27167f84e2d469deaa3da3403bc.tar.gz websocksy-4256eaae74f6f27167f84e2d469deaa3da3403bc.tar.bz2 websocksy-4256eaae74f6f27167f84e2d469deaa3da3403bc.zip |
Fix minor bugs
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/backend_file.c | 6 |
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, ' '); |