 +      $this->assertEquals('text/html', $response->getHeader('Content-Type'));
 +      $this->assertEquals($body, $response->readData());
 +    }
++  
++    /**
++     * Test empty response
++     *
++     */
++    #[@test]
++    public function emptyDocument() {
++      $response= $this->newResponse(array('HTTP/1.0 204 No content'));
++      $this->assertEquals(204, $response->getStatusCode());
++    }
 +
 +    /**
 +     * Test chunked transfer-encoding
 +     *
 +     */
 +    #[@test]
-+    public function getChunkedDocument() {
++    public function chunkedDocument() {
 +      $body= '<h1>File not found</h1>';
 +      $response= $this->newResponse(array('HTTP/1.0 404 OK', 'Transfer-Encoding: chunked'), "17\r\n".$body."\r\n0\r\n");
 +      $this->assertEquals(404, $response->getStatusCode());

+    }
+
+    /**
+     * Test what happens when the server responds with an incorrect protocol
+     *
+     */

===================================================================
--- ports/classes/net/xp_framework/unittest/peer/HttpResponseTest.class.php	(revision 0)
+++ ports/classes/net/xp_framework/unittest/peer/HttpResponseTest.class.php	(revision 0)
@@ -0,0 +1,90 @@
+<?php
+/* This class is part of the XP framework
+ *
