Log message about invalid request with DEBUG level (it can be caused by not configured proxy server, it's not an application error)
Merge pull request #1802 from dmitry-treskunov/logs

Log message about invalid request with DEBUG level
Free memory
Fix regression caused by #1771, fix #1770 as well
Fixes #1803
Fixes #1804
Fixes #1801
proper log
proper log