Looking at the test case, it doesn't seem unreasonable behaviour given that the HTTP request/response has worked correctly. I'd probably only expect an IOException if the response was syntactically invalid/incomplete but in this case the response is complete. The application has visibility of the response code and (lack of) headers so it can decide what to do about it.
If you threw an IOException then it would be impossible for the application to handle this specific situation (in a legitimate but non-standard way for example) because they'd not be able to distinguish this case from any other.
Charles, in future, can you remove the println's from the tests before submitting a patch. We try to avoid verbose output from tests. Thanks.