it turns out that the whitespace was not the problem; it was the lack of a Content-Length header, which was fixed in the same commit.