Skip to content

Commit 707d7e3

Browse files
committed
fix test to send valid request, since according to 4.4, if Content-length is present it must match the number of bytes in the body
1 parent b3bc453 commit 707d7e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/test_mains/B6361557.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public void handle (HttpExchange t)
6565
}
6666

6767
final static String request = "GET /test/foo.html HTTP/1.1\r\nContent-length: 0\r\n\r\n";
68-
final static ByteBuffer requestBuf = ByteBuffer.allocate(64).put(request.getBytes());
68+
final static ByteBuffer requestBuf = ByteBuffer.wrap(request.getBytes());
6969

7070
public static void main (String[] args) throws Exception {
7171
Handler handler = new Handler();

0 commit comments

Comments
 (0)