http_server fails due to content-length handling