Fix (possible) bugs in (Recursor) webserver

All found by Coverty Scan.