Skip to content

Commit

Permalink
Log dropped clients when http-proxy reply is too long
Browse files Browse the repository at this point in the history
  • Loading branch information
darkk committed Apr 12, 2016
1 parent 6804500 commit ec06dc6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions http-connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ static void httpc_read_cb(struct bufferevent *buffev, void *_arg)
free(line);
}
else if (len >= HTTP_HEAD_WM_HIGH) {
redsocks_log_error(client, LOG_NOTICE, "HTTP Proxy reply is too long, %zu bytes", len);
redsocks_drop_client(client);
dropped = 1;
}
Expand Down
1 change: 1 addition & 0 deletions http-relay.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ static void httpr_relay_read_cb(struct bufferevent *buffev, void *_arg)
free(line);
}
else if (len >= HTTP_HEAD_WM_HIGH) {
redsocks_log_error(client, LOG_NOTICE, "HTTP Proxy reply is too long, %zu bytes", len);
redsocks_drop_client(client);
dropped = 1;
}
Expand Down

0 comments on commit ec06dc6

Please sign in to comment.