Agreed, but this was copied verbatim from `http_api` and I'd rather leave it as-is for now to minimise the possibility of breaking things.