response.assertHeader("Content-Length", "32");
}
@Test public void
doesNotSetContentLengthOnVariableLengthBodies() throws Exception {
contentLengthHeader.connectTo(new Application() {
public void handle(Request request, Response response) throws Exception {
response.body(new ChunkedBody() {
public void writeTo(OutputStream out, Charset charset) throws IOException {
out.write("A variable length body".getBytes(charset));
}