Turns out this fails because run-webkit-tests was eating the first occurrence of 'Content-Type: text/plain' as a header. Strange but true. So do as Chromium does and preface all text dumps with the 'Content-Type: text/plain' header.
Created attachment 55040 [details] Patch
Comment on attachment 55040 [details] Patch OK. There are other possible mimetypes, but hard-coding plain/text for now is OK.
Landed in r59017.