httpd: fix num bytes read logic