changeset 742:28a21c9c2bf2

HttpHeadersImpl support
author Devel 2
date Wed, 06 Dec 2017 15:09:02 +0100
parents 5dff250da346
children b405a798b5b1
files stress-tester/src/main/java/com/passus/st/reader/nc/HttpSessionPayloadEventDataReader.java stress-tester/src/test/java/com/passus/st/reader/nc/HttpSessionPayloadEventDataWriterTest.java
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/stress-tester/src/main/java/com/passus/st/reader/nc/HttpSessionPayloadEventDataReader.java	Wed Dec 06 12:24:09 2017 +0100
+++ b/stress-tester/src/main/java/com/passus/st/reader/nc/HttpSessionPayloadEventDataReader.java	Wed Dec 06 15:09:02 2017 +0100
@@ -3,11 +3,11 @@
 import com.passus.data.ByteBuff;
 import com.passus.data.ByteBuffDataSource;
 import com.passus.data.ByteString;
-import com.passus.data.DataHelper;
 import com.passus.data.DataSource;
 import com.passus.data.HeapByteBuff;
 import com.passus.net.http.HttpConsts;
 import com.passus.net.http.HttpHeaders;
+import com.passus.net.http.HttpHeadersImpl;
 import com.passus.net.http.HttpMessage;
 import com.passus.net.http.HttpMethod;
 import com.passus.net.http.HttpRequest;
@@ -96,7 +96,7 @@
         long headerSize = ncDataHelper.readLongVLC(buffer);
         int startIndex = buffer.startIndex();
 
-        HttpHeaders headers = new HttpHeaders();
+        HttpHeaders headers = new HttpHeadersImpl();
         for (;;) {
             byte headerCode = buffer.read();
             ByteString headerName;
--- a/stress-tester/src/test/java/com/passus/st/reader/nc/HttpSessionPayloadEventDataWriterTest.java	Wed Dec 06 12:24:09 2017 +0100
+++ b/stress-tester/src/test/java/com/passus/st/reader/nc/HttpSessionPayloadEventDataWriterTest.java	Wed Dec 06 15:09:02 2017 +0100
@@ -2,6 +2,7 @@
 
 import com.passus.data.HeapByteBuff;
 import com.passus.net.http.HttpHeaders;
+import com.passus.net.http.HttpHeadersImpl;
 import com.passus.net.http.HttpRequest;
 import com.passus.net.http.HttpRequestBuilder;
 import com.passus.st.client.http.HttpSessionPayloadEvent;
@@ -36,7 +37,7 @@
 
     @Test
     public void testEncodeHeaders() throws Exception {
-        HttpHeaders headers = new HttpHeaders();
+        HttpHeaders headers = new HttpHeadersImpl();
         headers.add(HttpHeaders.HOST, "test");
         headers.add("X-HEADER", "X-HEADER-VALUE");
         HeapByteBuff buffer = new HeapByteBuff();