398467 Servlet 3.1 Non Blocking IO

fixed some tests
This commit is contained in:
Greg Wilkins 2013-07-08 14:59:08 +10:00
parent 83b55418f5
commit 70b285eabd
3 changed files with 3 additions and 3 deletions

View File

@ -826,7 +826,7 @@ public class HttpFields implements Iterable<HttpField>
if (value != null && value.length() > 0)
QuotedStringTokenizer.quoteIfNeeded(buf, value, delim);
if (version!=0)
if (version>0)
buf.append(";Version=").append(version);
if (path != null && path.length() > 0)

View File

@ -344,7 +344,7 @@ public class HttpFieldsTest
fields.clear();
fields.addSetCookie("ev erything","va lue","do main","pa th",1,"co mment",true,true,2);
String setCookie=fields.getStringField("Set-Cookie");
assertThat(setCookie,Matchers.startsWith("\"ev erything\"=\"va lue\";Path=\"pa th\";Domain=\"do main\";Expires="));
assertThat(setCookie,Matchers.startsWith("\"ev erything\"=\"va lue\";Version=2;Path=\"pa th\";Domain=\"do main\";Expires="));
assertThat(setCookie,Matchers.endsWith(" GMT;Max-Age=1;Secure;HttpOnly;Comment=\"co mment\""));
fields.clear();

View File

@ -43,7 +43,7 @@ public class HttpWriterTest
_bytes = BufferUtil.allocate(2048);
final ByteBufferPool bufferPool = new MappedByteBufferPool();
HttpChannel<?> channel = new HttpChannel<ByteBuffer>(null,new HttpConfiguration(),null,null,null)
HttpChannel<?> channel = new HttpChannel<ByteBuffer>(null,new HttpConfiguration(),null,null,new ByteBufferHttpInput())
{
@Override
public ByteBufferPool getByteBufferPool()