Attempt to reproduce #5593. Test case 1514 is very similar but uses HTTP/1.1 and thus switches to chunked. Closes #5595