client: fix incorrectly emitting HTTP 413 for certain content lengths