Fix for #308854 (Update test suite to JUnit4 - Module jetty-http).
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1752 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
cddf630426
commit
15dc2319d1
|
@ -5,6 +5,7 @@ jetty-7.1.1-SNAPSHOT
|
||||||
+ 308860 Update test suite to JUnit4 - Module jetty-rewrite
|
+ 308860 Update test suite to JUnit4 - Module jetty-rewrite
|
||||||
+ 308850 Update test suite to JUnit4 - Module jetty-annotations
|
+ 308850 Update test suite to JUnit4 - Module jetty-annotations
|
||||||
+ 308853 Update test suite to JUnit4 - Module jetty-deploy
|
+ 308853 Update test suite to JUnit4 - Module jetty-deploy
|
||||||
|
+ 308854 Update test suite to JUnit4 - Module jetty-http
|
||||||
|
|
||||||
jetty-7.1.0 5 May 2010
|
jetty-7.1.0 5 May 2010
|
||||||
+ 306353 fixed cross context dispatch to root context.
|
+ 306353 fixed cross context dispatch to root context.
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
|
<version>${junit4-version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
|
@ -17,21 +17,24 @@ import java.util.Enumeration;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
|
||||||
|
|
||||||
import org.eclipse.jetty.io.Buffer;
|
import org.eclipse.jetty.io.Buffer;
|
||||||
|
import org.eclipse.jetty.io.BufferCache.CachedBuffer;
|
||||||
import org.eclipse.jetty.io.ByteArrayBuffer;
|
import org.eclipse.jetty.io.ByteArrayBuffer;
|
||||||
import org.eclipse.jetty.io.View;
|
import org.eclipse.jetty.io.View;
|
||||||
import org.eclipse.jetty.io.BufferCache.CachedBuffer;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertNotNull;
|
||||||
|
import static org.junit.Assert.assertNull;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------------- */
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class HttpFieldsTest extends TestCase
|
public class HttpFieldsTest
|
||||||
{
|
{
|
||||||
public void testPut()
|
@Test
|
||||||
throws Exception
|
public void testPut() throws Exception
|
||||||
{
|
{
|
||||||
HttpFields header = new HttpFields();
|
HttpFields header = new HttpFields();
|
||||||
|
|
||||||
|
@ -54,15 +57,14 @@ public class HttpFieldsTest extends TestCase
|
||||||
}
|
}
|
||||||
assertEquals(2, matches);
|
assertEquals(2, matches);
|
||||||
|
|
||||||
matches=0;
|
|
||||||
e = header.getValues("name0");
|
e = header.getValues("name0");
|
||||||
assertEquals(true, e.hasMoreElements());
|
assertEquals(true, e.hasMoreElements());
|
||||||
assertEquals(e.nextElement(), "value0");
|
assertEquals(e.nextElement(), "value0");
|
||||||
assertEquals(false, e.hasMoreElements());
|
assertEquals(false, e.hasMoreElements());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testCRLF()
|
@Test
|
||||||
throws Exception
|
public void testCRLF() throws Exception
|
||||||
{
|
{
|
||||||
HttpFields header = new HttpFields();
|
HttpFields header = new HttpFields();
|
||||||
|
|
||||||
|
@ -77,8 +79,8 @@ public class HttpFieldsTest extends TestCase
|
||||||
assertTrue(buffer.toString().contains("name2: value:2"));
|
assertTrue(buffer.toString().contains("name2: value:2"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testCachedPut()
|
@Test
|
||||||
throws Exception
|
public void testCachedPut() throws Exception
|
||||||
{
|
{
|
||||||
HttpFields header = new HttpFields();
|
HttpFields header = new HttpFields();
|
||||||
|
|
||||||
|
@ -96,12 +98,10 @@ public class HttpFieldsTest extends TestCase
|
||||||
matches++;
|
matches++;
|
||||||
}
|
}
|
||||||
assertEquals(1, matches);
|
assertEquals(1, matches);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testRePut()
|
@Test
|
||||||
throws Exception
|
public void testRePut() throws Exception
|
||||||
{
|
{
|
||||||
HttpFields header = new HttpFields();
|
HttpFields header = new HttpFields();
|
||||||
|
|
||||||
|
@ -134,15 +134,14 @@ public class HttpFieldsTest extends TestCase
|
||||||
}
|
}
|
||||||
assertEquals(3, matches);
|
assertEquals(3, matches);
|
||||||
|
|
||||||
matches=0;
|
|
||||||
e = header.getValues("name1");
|
e = header.getValues("name1");
|
||||||
assertEquals(true, e.hasMoreElements());
|
assertEquals(true, e.hasMoreElements());
|
||||||
assertEquals(e.nextElement(), "value1");
|
assertEquals(e.nextElement(), "value1");
|
||||||
assertEquals(false, e.hasMoreElements());
|
assertEquals(false, e.hasMoreElements());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testRemovePut()
|
@Test
|
||||||
throws Exception
|
public void testRemovePut() throws Exception
|
||||||
{
|
{
|
||||||
HttpFields header = new HttpFields();
|
HttpFields header = new HttpFields();
|
||||||
|
|
||||||
|
@ -175,14 +174,12 @@ public class HttpFieldsTest extends TestCase
|
||||||
}
|
}
|
||||||
assertEquals(2, matches);
|
assertEquals(2, matches);
|
||||||
|
|
||||||
matches=0;
|
|
||||||
e = header.getValues("name1");
|
e = header.getValues("name1");
|
||||||
assertEquals(false, e.hasMoreElements());
|
assertEquals(false, e.hasMoreElements());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testAdd()
|
public void testAdd() throws Exception
|
||||||
throws Exception
|
|
||||||
{
|
{
|
||||||
HttpFields fields = new HttpFields();
|
HttpFields fields = new HttpFields();
|
||||||
|
|
||||||
|
@ -215,7 +212,6 @@ public class HttpFieldsTest extends TestCase
|
||||||
}
|
}
|
||||||
assertEquals(3, matches);
|
assertEquals(3, matches);
|
||||||
|
|
||||||
matches=0;
|
|
||||||
e = fields.getValues("name1");
|
e = fields.getValues("name1");
|
||||||
assertEquals(true, e.hasMoreElements());
|
assertEquals(true, e.hasMoreElements());
|
||||||
assertEquals(e.nextElement(), "valueA");
|
assertEquals(e.nextElement(), "valueA");
|
||||||
|
@ -224,8 +220,8 @@ public class HttpFieldsTest extends TestCase
|
||||||
assertEquals(false, e.hasMoreElements());
|
assertEquals(false, e.hasMoreElements());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testReuse()
|
@Test
|
||||||
throws Exception
|
public void testReuse() throws Exception
|
||||||
{
|
{
|
||||||
HttpFields header = new HttpFields();
|
HttpFields header = new HttpFields();
|
||||||
Buffer n1=new ByteArrayBuffer("name1");
|
Buffer n1=new ByteArrayBuffer("name1");
|
||||||
|
@ -266,15 +262,14 @@ public class HttpFieldsTest extends TestCase
|
||||||
}
|
}
|
||||||
assertEquals(3, matches);
|
assertEquals(3, matches);
|
||||||
|
|
||||||
matches=0;
|
|
||||||
e = header.getValues("name1");
|
e = header.getValues("name1");
|
||||||
assertEquals(true, e.hasMoreElements());
|
assertEquals(true, e.hasMoreElements());
|
||||||
assertEquals(e.nextElement(), "value1");
|
assertEquals(e.nextElement(), "value1");
|
||||||
assertEquals(false, e.hasMoreElements());
|
assertEquals(false, e.hasMoreElements());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testDestroy()
|
@Test
|
||||||
throws Exception
|
public void testDestroy() throws Exception
|
||||||
{
|
{
|
||||||
HttpFields header = new HttpFields();
|
HttpFields header = new HttpFields();
|
||||||
|
|
||||||
|
@ -288,11 +283,10 @@ public class HttpFieldsTest extends TestCase
|
||||||
assertNull(header.getStringField("name0"));
|
assertNull(header.getStringField("name0"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testCase()
|
@Test
|
||||||
throws Exception
|
public void testCase() throws Exception
|
||||||
{
|
{
|
||||||
HttpFields fields= new HttpFields();
|
HttpFields fields= new HttpFields();
|
||||||
Enumeration e;
|
|
||||||
Set s;
|
Set s;
|
||||||
// 0123456789012345678901234567890
|
// 0123456789012345678901234567890
|
||||||
byte[] b ="Message-IDmessage-idvalueVALUE".getBytes();
|
byte[] b ="Message-IDmessage-idvalueVALUE".getBytes();
|
||||||
|
@ -352,16 +346,16 @@ public class HttpFieldsTest extends TestCase
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testHttpHeaderValues()
|
@Test
|
||||||
throws Exception
|
public void testHttpHeaderValues() throws Exception
|
||||||
{
|
{
|
||||||
assertTrue(((CachedBuffer)HttpHeaderValues.CACHE.lookup("unknown value")).getOrdinal()<0);
|
assertTrue(((CachedBuffer)HttpHeaderValues.CACHE.lookup("unknown value")).getOrdinal()<0);
|
||||||
assertTrue(((CachedBuffer)HttpHeaderValues.CACHE.lookup("close")).getOrdinal()>=0);
|
assertTrue(((CachedBuffer)HttpHeaderValues.CACHE.lookup("close")).getOrdinal()>=0);
|
||||||
assertTrue(((CachedBuffer)HttpHeaderValues.CACHE.lookup("Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)")).getOrdinal()>=0);
|
assertTrue(((CachedBuffer)HttpHeaderValues.CACHE.lookup("Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)")).getOrdinal()>=0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testSetCookie()
|
@Test
|
||||||
throws Exception
|
public void testSetCookie() throws Exception
|
||||||
{
|
{
|
||||||
HttpFields fields = new HttpFields();
|
HttpFields fields = new HttpFields();
|
||||||
fields.addSetCookie("minimal","value",null,null,-1,null,false,false,-1);
|
fields.addSetCookie("minimal","value",null,null,-1,null,false,false,-1);
|
||||||
|
@ -394,16 +388,16 @@ public class HttpFieldsTest extends TestCase
|
||||||
assertEquals("foo=bob;Domain=domain",e.nextElement());
|
assertEquals("foo=bob;Domain=domain",e.nextElement());
|
||||||
}
|
}
|
||||||
|
|
||||||
private Set enum2set(Enumeration e)
|
private Set<String> enum2set(Enumeration<String> e)
|
||||||
{
|
{
|
||||||
HashSet s=new HashSet();
|
Set<String> s=new HashSet<String>();
|
||||||
while(e.hasMoreElements())
|
while(e.hasMoreElements())
|
||||||
s.add(e.nextElement().toString().toLowerCase());
|
s.add(e.nextElement().toLowerCase());
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testDateFields()
|
@Test
|
||||||
throws Exception
|
public void testDateFields() throws Exception
|
||||||
{
|
{
|
||||||
HttpFields fields = new HttpFields();
|
HttpFields fields = new HttpFields();
|
||||||
|
|
||||||
|
@ -444,8 +438,8 @@ public class HttpFieldsTest extends TestCase
|
||||||
assertEquals("Fri, 31 Dec 1999 23:59:59 GMT",fields.getStringField("D2"));
|
assertEquals("Fri, 31 Dec 1999 23:59:59 GMT",fields.getStringField("D2"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testLongFields()
|
@Test
|
||||||
throws Exception
|
public void testLongFields() throws Exception
|
||||||
{
|
{
|
||||||
HttpFields header = new HttpFields();
|
HttpFields header = new HttpFields();
|
||||||
|
|
||||||
|
@ -491,8 +485,8 @@ public class HttpFieldsTest extends TestCase
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testToString()
|
@Test
|
||||||
throws Exception
|
public void testToString() throws Exception
|
||||||
{
|
{
|
||||||
HttpFields header = new HttpFields();
|
HttpFields header = new HttpFields();
|
||||||
|
|
||||||
|
|
|
@ -15,26 +15,23 @@ package org.eclipse.jetty.http;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
|
||||||
|
|
||||||
import org.eclipse.jetty.io.Buffer;
|
import org.eclipse.jetty.io.Buffer;
|
||||||
import org.eclipse.jetty.io.ByteArrayBuffer;
|
import org.eclipse.jetty.io.ByteArrayBuffer;
|
||||||
import org.eclipse.jetty.io.ByteArrayEndPoint;
|
import org.eclipse.jetty.io.ByteArrayEndPoint;
|
||||||
import org.eclipse.jetty.io.SimpleBuffers;
|
import org.eclipse.jetty.io.SimpleBuffers;
|
||||||
import org.eclipse.jetty.io.View;
|
import org.eclipse.jetty.io.View;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
public class HttpGeneratorClientTest extends TestCase
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
|
public class HttpGeneratorClientTest
|
||||||
{
|
{
|
||||||
public final static String CONTENT="The quick brown fox jumped over the lazy dog.\nNow is the time for all good men to come to the aid of the party\nThe moon is blue to a fish in love.\n";
|
public final static String CONTENT="The quick brown fox jumped over the lazy dog.\nNow is the time for all good men to come to the aid of the party\nThe moon is blue to a fish in love.\n";
|
||||||
public final static String[] connect={null,"keep-alive","close"};
|
public final static String[] connect={null,"keep-alive","close"};
|
||||||
|
|
||||||
public HttpGeneratorClientTest(String arg0)
|
@Test
|
||||||
{
|
public void testContentLength() throws Exception
|
||||||
super(arg0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testContentLength()
|
|
||||||
throws Exception
|
|
||||||
{
|
{
|
||||||
Buffer bb=new ByteArrayBuffer(8096);
|
Buffer bb=new ByteArrayBuffer(8096);
|
||||||
Buffer sb=new ByteArrayBuffer(1500);
|
Buffer sb=new ByteArrayBuffer(1500);
|
||||||
|
@ -61,8 +58,8 @@ public class HttpGeneratorClientTest extends TestCase
|
||||||
assertEquals("GET /usr HTTP/1.1|Header: Value|Content-Type: text/plain|Content-Length: 44||"+content,result);
|
assertEquals("GET /usr HTTP/1.1|Header: Value|Content-Type: text/plain|Content-Length: 44||"+content,result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAutoContentLength()
|
@Test
|
||||||
throws Exception
|
public void testAutoContentLength() throws Exception
|
||||||
{
|
{
|
||||||
Buffer bb=new ByteArrayBuffer(8096);
|
Buffer bb=new ByteArrayBuffer(8096);
|
||||||
Buffer sb=new ByteArrayBuffer(1500);
|
Buffer sb=new ByteArrayBuffer(1500);
|
||||||
|
@ -88,8 +85,8 @@ public class HttpGeneratorClientTest extends TestCase
|
||||||
assertEquals("GET /usr HTTP/1.1|Header: Value|Content-Type: text/plain|Content-Length: 44||"+content,result);
|
assertEquals("GET /usr HTTP/1.1|Header: Value|Content-Type: text/plain|Content-Length: 44||"+content,result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testChunked()
|
@Test
|
||||||
throws Exception
|
public void testChunked() throws Exception
|
||||||
{
|
{
|
||||||
Buffer bb=new ByteArrayBuffer(8096);
|
Buffer bb=new ByteArrayBuffer(8096);
|
||||||
Buffer sb=new ByteArrayBuffer(1500);
|
Buffer sb=new ByteArrayBuffer(1500);
|
||||||
|
@ -115,8 +112,8 @@ public class HttpGeneratorClientTest extends TestCase
|
||||||
assertEquals("GET /usr HTTP/1.1|Header: Value|Content-Type: text/plain|Transfer-Encoding: chunked||2C|"+content+"|0||",result);
|
assertEquals("GET /usr HTTP/1.1|Header: Value|Content-Type: text/plain|Transfer-Encoding: chunked||2C|"+content+"|0||",result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testHTTP()
|
@Test
|
||||||
throws Exception
|
public void testHTTP() throws Exception
|
||||||
{
|
{
|
||||||
Buffer bb=new ByteArrayBuffer(8096);
|
Buffer bb=new ByteArrayBuffer(8096);
|
||||||
Buffer sb=new ByteArrayBuffer(1500);
|
Buffer sb=new ByteArrayBuffer(1500);
|
||||||
|
@ -195,15 +192,13 @@ public class HttpGeneratorClientTest extends TestCase
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final String[] headers= { "Content-Type","Content-Length","Connection","Transfer-Encoding","Other"};
|
||||||
|
private class TR
|
||||||
static final String[] headers= { "Content-Type","Content-Length","Connection","Transfer-Encoding","Other"};
|
|
||||||
class TR
|
|
||||||
{
|
{
|
||||||
String[] values=new String[headers.length];
|
private String[] values=new String[headers.length];
|
||||||
String body;
|
private String body;
|
||||||
|
|
||||||
TR(String ct, String cl ,String content)
|
private TR(String ct, String cl ,String content)
|
||||||
{
|
{
|
||||||
values[0]=ct;
|
values[0]=ct;
|
||||||
values[1]=cl;
|
values[1]=cl;
|
||||||
|
@ -211,7 +206,7 @@ public class HttpGeneratorClientTest extends TestCase
|
||||||
this.body=content;
|
this.body=content;
|
||||||
}
|
}
|
||||||
|
|
||||||
void build(int version,HttpGenerator hb, String connection, String te, int chunks, HttpFields fields)
|
private void build(int version,HttpGenerator hb, String connection, String te, int chunks, HttpFields fields)
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
values[2]=connection;
|
values[2]=connection;
|
||||||
|
@ -270,7 +265,7 @@ public class HttpGeneratorClientTest extends TestCase
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private TR[] tr =
|
private final TR[] tr =
|
||||||
{
|
{
|
||||||
/* 0 */ new TR(null,null,null),
|
/* 0 */ new TR(null,null,null),
|
||||||
/* 1 */ new TR(null,null,CONTENT),
|
/* 1 */ new TR(null,null,CONTENT),
|
||||||
|
@ -281,17 +276,17 @@ public class HttpGeneratorClientTest extends TestCase
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
String content;
|
private String content;
|
||||||
String f0;
|
private String f0;
|
||||||
String f1;
|
private String f1;
|
||||||
String f2;
|
private String f2;
|
||||||
String[] hdr;
|
private String[] hdr;
|
||||||
String[] val;
|
private String[] val;
|
||||||
int h;
|
private int h;
|
||||||
|
|
||||||
class Handler extends HttpParser.EventHandler
|
private class Handler extends HttpParser.EventHandler
|
||||||
{
|
{
|
||||||
int index=0;
|
private int index=0;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void content(Buffer ref)
|
public void content(Buffer ref)
|
||||||
|
@ -302,7 +297,6 @@ public class HttpGeneratorClientTest extends TestCase
|
||||||
index+=ref.length();
|
index+=ref.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void startRequest(Buffer tok0, Buffer tok1, Buffer tok2)
|
public void startRequest(Buffer tok0, Buffer tok1, Buffer tok2)
|
||||||
{
|
{
|
||||||
|
@ -319,7 +313,6 @@ public class HttpGeneratorClientTest extends TestCase
|
||||||
// System.out.println(f0+" "+f1+" "+f2);
|
// System.out.println(f0+" "+f1+" "+f2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jetty.EventHandler#startResponse(org.eclipse.io.Buffer, int, org.eclipse.io.Buffer)
|
* @see org.eclipse.jetty.EventHandler#startResponse(org.eclipse.io.Buffer, int, org.eclipse.io.Buffer)
|
||||||
*/
|
*/
|
||||||
|
@ -355,8 +348,5 @@ public class HttpGeneratorClientTest extends TestCase
|
||||||
public void messageComplete(long contentLength)
|
public void messageComplete(long contentLength)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,16 +13,18 @@
|
||||||
|
|
||||||
package org.eclipse.jetty.http;
|
package org.eclipse.jetty.http;
|
||||||
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
|
||||||
|
|
||||||
import org.eclipse.jetty.io.Buffer;
|
import org.eclipse.jetty.io.Buffer;
|
||||||
import org.eclipse.jetty.io.ByteArrayBuffer;
|
import org.eclipse.jetty.io.ByteArrayBuffer;
|
||||||
import org.eclipse.jetty.io.ByteArrayEndPoint;
|
import org.eclipse.jetty.io.ByteArrayEndPoint;
|
||||||
import org.eclipse.jetty.io.SimpleBuffers;
|
import org.eclipse.jetty.io.SimpleBuffers;
|
||||||
import org.eclipse.jetty.io.View;
|
import org.eclipse.jetty.io.View;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertFalse;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -30,18 +32,13 @@ import org.eclipse.jetty.io.View;
|
||||||
* To change the template for this generated type comment go to
|
* To change the template for this generated type comment go to
|
||||||
* Window - Preferences - Java - Code Generation - Code and Comments
|
* Window - Preferences - Java - Code Generation - Code and Comments
|
||||||
*/
|
*/
|
||||||
public class HttpGeneratorTest extends TestCase
|
public class HttpGeneratorTest
|
||||||
{
|
{
|
||||||
public final static String CONTENT="The quick brown fox jumped over the lazy dog.\nNow is the time for all good men to come to the aid of the party\nThe moon is blue to a fish in love.\n";
|
public final static String CONTENT="The quick brown fox jumped over the lazy dog.\nNow is the time for all good men to come to the aid of the party\nThe moon is blue to a fish in love.\n";
|
||||||
public final static String[] connect={null,"keep-alive","close","TE, close"};
|
public final static String[] connect={null,"keep-alive","close","TE, close"};
|
||||||
|
|
||||||
public HttpGeneratorTest(String arg0)
|
@Test
|
||||||
{
|
public void testRequest() throws Exception
|
||||||
super(arg0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testRequest()
|
|
||||||
throws Exception
|
|
||||||
{
|
{
|
||||||
Buffer bb=new ByteArrayBuffer(8096);
|
Buffer bb=new ByteArrayBuffer(8096);
|
||||||
Buffer sb=new ByteArrayBuffer(1500);
|
Buffer sb=new ByteArrayBuffer(1500);
|
||||||
|
@ -59,11 +56,10 @@ public class HttpGeneratorTest extends TestCase
|
||||||
|
|
||||||
assertTrue(endp.getOut().toString().indexOf("GET /index.html HTTP/1.1")==0);
|
assertTrue(endp.getOut().toString().indexOf("GET /index.html HTTP/1.1")==0);
|
||||||
assertTrue(endp.getOut().toString().indexOf("Content-Length")==-1);
|
assertTrue(endp.getOut().toString().indexOf("Content-Length")==-1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testHTTP()
|
@Test
|
||||||
throws Exception
|
public void testHTTP() throws Exception
|
||||||
{
|
{
|
||||||
Buffer bb=new ByteArrayBuffer(8096);
|
Buffer bb=new ByteArrayBuffer(8096);
|
||||||
Buffer sb=new ByteArrayBuffer(1500);
|
Buffer sb=new ByteArrayBuffer(1500);
|
||||||
|
@ -134,16 +130,14 @@ public class HttpGeneratorTest extends TestCase
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final String[] headers= { "Content-Type","Content-Length","Connection","Transfer-Encoding","Other"};
|
||||||
|
private class TR
|
||||||
static final String[] headers= { "Content-Type","Content-Length","Connection","Transfer-Encoding","Other"};
|
|
||||||
class TR
|
|
||||||
{
|
{
|
||||||
int code;
|
private int code;
|
||||||
String[] values=new String[headers.length];
|
private String[] values=new String[headers.length];
|
||||||
String body;
|
private String body;
|
||||||
|
|
||||||
TR(int code,String ct, String cl ,String content)
|
private TR(int code,String ct, String cl ,String content)
|
||||||
{
|
{
|
||||||
this.code=code;
|
this.code=code;
|
||||||
values[0]=ct;
|
values[0]=ct;
|
||||||
|
@ -152,8 +146,7 @@ public class HttpGeneratorTest extends TestCase
|
||||||
this.body=content;
|
this.body=content;
|
||||||
}
|
}
|
||||||
|
|
||||||
void build(int version,HttpGenerator hb,String reason, String connection, String te, int chunks, HttpFields fields)
|
private void build(int version,HttpGenerator hb,String reason, String connection, String te, int chunks, HttpFields fields) throws Exception
|
||||||
throws Exception
|
|
||||||
{
|
{
|
||||||
values[2]=connection;
|
values[2]=connection;
|
||||||
values[3]=te;
|
values[3]=te;
|
||||||
|
@ -206,7 +199,7 @@ public class HttpGeneratorTest extends TestCase
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private TR[] tr =
|
private final TR[] tr =
|
||||||
{
|
{
|
||||||
/* 0 */ new TR(200,null,null,null),
|
/* 0 */ new TR(200,null,null,null),
|
||||||
/* 1 */ new TR(200,null,null,CONTENT),
|
/* 1 */ new TR(200,null,null,CONTENT),
|
||||||
|
@ -218,17 +211,17 @@ public class HttpGeneratorTest extends TestCase
|
||||||
/* 7 */ new TR(200,"text/html",""+CONTENT.length(),CONTENT),
|
/* 7 */ new TR(200,"text/html",""+CONTENT.length(),CONTENT),
|
||||||
};
|
};
|
||||||
|
|
||||||
String content;
|
private String content;
|
||||||
String f0;
|
private String f0;
|
||||||
String f1;
|
private String f1;
|
||||||
String f2;
|
private String f2;
|
||||||
String[] hdr;
|
private String[] hdr;
|
||||||
String[] val;
|
private String[] val;
|
||||||
int h;
|
private int h;
|
||||||
|
|
||||||
class Handler extends HttpParser.EventHandler
|
private class Handler extends HttpParser.EventHandler
|
||||||
{
|
{
|
||||||
int index=0;
|
private int index=0;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void content(Buffer ref)
|
public void content(Buffer ref)
|
||||||
|
@ -239,7 +232,6 @@ public class HttpGeneratorTest extends TestCase
|
||||||
index+=ref.length();
|
index+=ref.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void startRequest(Buffer tok0, Buffer tok1, Buffer tok2)
|
public void startRequest(Buffer tok0, Buffer tok1, Buffer tok2)
|
||||||
{
|
{
|
||||||
|
@ -256,7 +248,6 @@ public class HttpGeneratorTest extends TestCase
|
||||||
// System.out.println(f0+" "+f1+" "+f2);
|
// System.out.println(f0+" "+f1+" "+f2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jetty.EventHandler#startResponse(org.eclipse.io.Buffer, int, org.eclipse.io.Buffer)
|
* @see org.eclipse.jetty.EventHandler#startResponse(org.eclipse.io.Buffer, int, org.eclipse.io.Buffer)
|
||||||
*/
|
*/
|
||||||
|
@ -292,8 +283,5 @@ public class HttpGeneratorTest extends TestCase
|
||||||
public void messageComplete(long contentLength)
|
public void messageComplete(long contentLength)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,56 +15,23 @@ package org.eclipse.jetty.http;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
|
||||||
|
|
||||||
import org.eclipse.jetty.io.Buffer;
|
import org.eclipse.jetty.io.Buffer;
|
||||||
import org.eclipse.jetty.io.ByteArrayBuffer;
|
import org.eclipse.jetty.io.ByteArrayBuffer;
|
||||||
import org.eclipse.jetty.io.SimpleBuffers;
|
import org.eclipse.jetty.io.SimpleBuffers;
|
||||||
import org.eclipse.jetty.io.bio.StringEndPoint;
|
import org.eclipse.jetty.io.bio.StringEndPoint;
|
||||||
import org.eclipse.jetty.util.StringUtil;
|
import org.eclipse.jetty.util.StringUtil;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* To change this generated comment edit the template variable "typecomment":
|
|
||||||
* Window>Preferences>Java>Templates.
|
|
||||||
* To enable and disable the creation of type comments go to
|
|
||||||
* Window>Preferences>Java>Code Generation.
|
|
||||||
*/
|
*/
|
||||||
public class HttpParserTest extends TestCase
|
public class HttpParserTest
|
||||||
{
|
{
|
||||||
/**
|
@Test
|
||||||
* Constructor for HttpParserTest.
|
public void testLineParse0() throws Exception
|
||||||
* @param arg0
|
|
||||||
*/
|
|
||||||
public HttpParserTest(String arg0)
|
|
||||||
{
|
|
||||||
super(arg0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args)
|
|
||||||
{
|
|
||||||
junit.textui.TestRunner.run(HttpParserTest.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see TestCase#setUp()
|
|
||||||
*/
|
|
||||||
protected void setUp() throws Exception
|
|
||||||
{
|
|
||||||
super.setUp();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see TestCase#tearDown()
|
|
||||||
*/
|
|
||||||
protected void tearDown() throws Exception
|
|
||||||
{
|
|
||||||
super.tearDown();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testLineParse0()
|
|
||||||
throws Exception
|
|
||||||
{
|
{
|
||||||
StringEndPoint io=new StringEndPoint();
|
StringEndPoint io=new StringEndPoint();
|
||||||
io.setInput("POST /foo HTTP/1.0\015\012" + "\015\012");
|
io.setInput("POST /foo HTTP/1.0\015\012" + "\015\012");
|
||||||
|
@ -80,8 +47,8 @@ public class HttpParserTest extends TestCase
|
||||||
assertEquals(-1, h);
|
assertEquals(-1, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testLineParse1()
|
@Test
|
||||||
throws Exception
|
public void testLineParse1() throws Exception
|
||||||
{
|
{
|
||||||
StringEndPoint io=new StringEndPoint();
|
StringEndPoint io=new StringEndPoint();
|
||||||
io.setInput("GET /999\015\012");
|
io.setInput("GET /999\015\012");
|
||||||
|
@ -98,8 +65,8 @@ public class HttpParserTest extends TestCase
|
||||||
assertEquals(-1, h);
|
assertEquals(-1, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testLineParse2()
|
@Test
|
||||||
throws Exception
|
public void testLineParse2() throws Exception
|
||||||
{
|
{
|
||||||
StringEndPoint io=new StringEndPoint();
|
StringEndPoint io=new StringEndPoint();
|
||||||
io.setInput("POST /222 \015\012");
|
io.setInput("POST /222 \015\012");
|
||||||
|
@ -116,8 +83,8 @@ public class HttpParserTest extends TestCase
|
||||||
assertEquals(-1, h);
|
assertEquals(-1, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testLineParse3()
|
@Test
|
||||||
throws Exception
|
public void testLineParse3() throws Exception
|
||||||
{
|
{
|
||||||
StringEndPoint io=new StringEndPoint();
|
StringEndPoint io=new StringEndPoint();
|
||||||
io.setInput("POST /fo\u0690 HTTP/1.0\015\012" + "\015\012");
|
io.setInput("POST /fo\u0690 HTTP/1.0\015\012" + "\015\012");
|
||||||
|
@ -133,8 +100,8 @@ public class HttpParserTest extends TestCase
|
||||||
assertEquals(-1, h);
|
assertEquals(-1, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testLineParse4()
|
@Test
|
||||||
throws Exception
|
public void testLineParse4() throws Exception
|
||||||
{
|
{
|
||||||
StringEndPoint io=new StringEndPoint();
|
StringEndPoint io=new StringEndPoint();
|
||||||
io.setInput("POST /foo?param=\u0690 HTTP/1.0\015\012" + "\015\012");
|
io.setInput("POST /foo?param=\u0690 HTTP/1.0\015\012" + "\015\012");
|
||||||
|
@ -150,8 +117,8 @@ public class HttpParserTest extends TestCase
|
||||||
assertEquals(-1, h);
|
assertEquals(-1, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testConnect()
|
@Test
|
||||||
throws Exception
|
public void testConnect() throws Exception
|
||||||
{
|
{
|
||||||
StringEndPoint io=new StringEndPoint();
|
StringEndPoint io=new StringEndPoint();
|
||||||
io.setInput("CONNECT 192.168.1.2:80 HTTP/1.1\015\012" + "\015\012");
|
io.setInput("CONNECT 192.168.1.2:80 HTTP/1.1\015\012" + "\015\012");
|
||||||
|
@ -168,8 +135,8 @@ public class HttpParserTest extends TestCase
|
||||||
assertEquals(-1, h);
|
assertEquals(-1, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testHeaderParse()
|
@Test
|
||||||
throws Exception
|
public void testHeaderParse() throws Exception
|
||||||
{
|
{
|
||||||
StringEndPoint io=new StringEndPoint();
|
StringEndPoint io=new StringEndPoint();
|
||||||
io.setInput(
|
io.setInput(
|
||||||
|
@ -207,8 +174,8 @@ public class HttpParserTest extends TestCase
|
||||||
assertEquals(5, h);
|
assertEquals(5, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testChunkParse()
|
@Test
|
||||||
throws Exception
|
public void testChunkParse() throws Exception
|
||||||
{
|
{
|
||||||
StringEndPoint io=new StringEndPoint();
|
StringEndPoint io=new StringEndPoint();
|
||||||
io.setInput(
|
io.setInput(
|
||||||
|
@ -237,8 +204,8 @@ public class HttpParserTest extends TestCase
|
||||||
assertEquals("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", _content);
|
assertEquals("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", _content);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testMultiParse()
|
@Test
|
||||||
throws Exception
|
public void testMultiParse() throws Exception
|
||||||
{
|
{
|
||||||
StringEndPoint io=new StringEndPoint();
|
StringEndPoint io=new StringEndPoint();
|
||||||
io.setInput(
|
io.setInput(
|
||||||
|
@ -293,9 +260,9 @@ public class HttpParserTest extends TestCase
|
||||||
assertEquals("Header3", hdr[0]);
|
assertEquals("Header3", hdr[0]);
|
||||||
assertEquals("value3", val[0]);
|
assertEquals("value3", val[0]);
|
||||||
assertEquals("0123456789", _content);
|
assertEquals("0123456789", _content);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testStreamParse() throws Exception
|
public void testStreamParse() throws Exception
|
||||||
{
|
{
|
||||||
StringEndPoint io=new StringEndPoint();
|
StringEndPoint io=new StringEndPoint();
|
||||||
|
@ -318,7 +285,6 @@ public class HttpParserTest extends TestCase
|
||||||
+ "\015\012"
|
+ "\015\012"
|
||||||
+ "0123456789\015\012";
|
+ "0123456789\015\012";
|
||||||
|
|
||||||
|
|
||||||
int[] tests=
|
int[] tests=
|
||||||
{
|
{
|
||||||
1024,
|
1024,
|
||||||
|
@ -346,7 +312,6 @@ public class HttpParserTest extends TestCase
|
||||||
Handler handler = new Handler();
|
Handler handler = new Handler();
|
||||||
HttpParser parser= new HttpParser(buffers,io, handler);
|
HttpParser parser= new HttpParser(buffers,io, handler);
|
||||||
|
|
||||||
|
|
||||||
io.setInput(http);
|
io.setInput(http);
|
||||||
|
|
||||||
parser.parse();
|
parser.parse();
|
||||||
|
@ -385,8 +350,8 @@ public class HttpParserTest extends TestCase
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testResponseParse0()
|
@Test
|
||||||
throws Exception
|
public void testResponseParse0() throws Exception
|
||||||
{
|
{
|
||||||
StringEndPoint io=new StringEndPoint();
|
StringEndPoint io=new StringEndPoint();
|
||||||
io.setInput(
|
io.setInput(
|
||||||
|
@ -409,8 +374,8 @@ public class HttpParserTest extends TestCase
|
||||||
assertTrue(messageCompleted);
|
assertTrue(messageCompleted);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testResponseParse1()
|
@Test
|
||||||
throws Exception
|
public void testResponseParse1() throws Exception
|
||||||
{
|
{
|
||||||
StringEndPoint io=new StringEndPoint();
|
StringEndPoint io=new StringEndPoint();
|
||||||
io.setInput(
|
io.setInput(
|
||||||
|
@ -430,8 +395,8 @@ public class HttpParserTest extends TestCase
|
||||||
assertTrue(messageCompleted);
|
assertTrue(messageCompleted);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testResponseParse2()
|
@Test
|
||||||
throws Exception
|
public void testResponseParse2() throws Exception
|
||||||
{
|
{
|
||||||
StringEndPoint io=new StringEndPoint();
|
StringEndPoint io=new StringEndPoint();
|
||||||
io.setInput(
|
io.setInput(
|
||||||
|
@ -464,21 +429,21 @@ public class HttpParserTest extends TestCase
|
||||||
assertTrue(messageCompleted);
|
assertTrue(messageCompleted);
|
||||||
}
|
}
|
||||||
|
|
||||||
String _content;
|
private String _content;
|
||||||
String f0;
|
private String f0;
|
||||||
String f1;
|
private String f1;
|
||||||
String f2;
|
private String f2;
|
||||||
String[] hdr;
|
private String[] hdr;
|
||||||
String[] val;
|
private String[] val;
|
||||||
int h;
|
private int h;
|
||||||
|
|
||||||
boolean headerCompleted;
|
private boolean headerCompleted;
|
||||||
boolean messageCompleted;
|
private boolean messageCompleted;
|
||||||
|
|
||||||
class Handler extends HttpParser.EventHandler
|
private class Handler extends HttpParser.EventHandler
|
||||||
{
|
{
|
||||||
HttpFields fields;
|
private HttpFields fields;
|
||||||
boolean request;
|
private boolean request;
|
||||||
|
|
||||||
public void content(Buffer ref)
|
public void content(Buffer ref)
|
||||||
{
|
{
|
||||||
|
@ -487,7 +452,6 @@ public class HttpParserTest extends TestCase
|
||||||
_content= _content + ref;
|
_content= _content + ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void startRequest(Buffer tok0, Buffer tok1, Buffer tok2)
|
public void startRequest(Buffer tok0, Buffer tok1, Buffer tok2)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -507,8 +471,7 @@ public class HttpParserTest extends TestCase
|
||||||
}
|
}
|
||||||
catch (UnsupportedEncodingException e)
|
catch (UnsupportedEncodingException e)
|
||||||
{
|
{
|
||||||
// TODO Auto-generated catch block
|
throw new RuntimeException(e);
|
||||||
e.printStackTrace();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
messageCompleted = false;
|
messageCompleted = false;
|
||||||
|
@ -541,7 +504,6 @@ public class HttpParserTest extends TestCase
|
||||||
messageCompleted = true;
|
messageCompleted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void startResponse(Buffer version, int status, Buffer reason)
|
public void startResponse(Buffer version, int status, Buffer reason)
|
||||||
{
|
{
|
||||||
request=false;
|
request=false;
|
||||||
|
|
|
@ -12,11 +12,14 @@
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
package org.eclipse.jetty.http;
|
package org.eclipse.jetty.http;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertNull;
|
||||||
|
|
||||||
public class HttpStatusCodeTest extends TestCase
|
public class HttpStatusCodeTest
|
||||||
{
|
{
|
||||||
|
@Test
|
||||||
public void testInvalidGetCode()
|
public void testInvalidGetCode()
|
||||||
{
|
{
|
||||||
assertNull("Invalid code: 800", HttpStatus.getCode(800));
|
assertNull("Invalid code: 800", HttpStatus.getCode(800));
|
||||||
|
|
|
@ -14,43 +14,14 @@
|
||||||
package org.eclipse.jetty.http;
|
package org.eclipse.jetty.http;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------ */
|
|
||||||
/**
|
/**
|
||||||
* Top level test harness.
|
|
||||||
*
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class PathMapTest extends TestCase
|
public class PathMapTest extends TestCase
|
||||||
{
|
{
|
||||||
/**
|
@Test
|
||||||
* Constructor for HttpParserTest.
|
|
||||||
*
|
|
||||||
* @param arg0
|
|
||||||
*/
|
|
||||||
public PathMapTest(String arg0)
|
|
||||||
{
|
|
||||||
super(arg0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see TestCase#setUp()
|
|
||||||
*/
|
|
||||||
protected void setUp() throws Exception
|
|
||||||
{
|
|
||||||
super.setUp();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see TestCase#tearDown()
|
|
||||||
*/
|
|
||||||
protected void tearDown() throws Exception
|
|
||||||
{
|
|
||||||
super.tearDown();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* --------------------------------------------------------------- */
|
|
||||||
public void testPathMap() throws Exception
|
public void testPathMap() throws Exception
|
||||||
{
|
{
|
||||||
PathMap p = new PathMap();
|
PathMap p = new PathMap();
|
||||||
|
@ -84,9 +55,9 @@ public class PathMapTest extends TestCase
|
||||||
{ "/animal/path.gz", "5"},
|
{ "/animal/path.gz", "5"},
|
||||||
{ "/Other/path", "8"},};
|
{ "/Other/path", "8"},};
|
||||||
|
|
||||||
for (int i = 0; i < tests.length; i++)
|
for (String[] test : tests)
|
||||||
{
|
{
|
||||||
assertEquals(tests[i][0], tests[i][1], p.getMatch(tests[i][0]).getValue());
|
assertEquals(test[0], test[1], p.getMatch(test[0]).getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
assertEquals("Get absolute path", "1", p.get("/abs/path"));
|
assertEquals("Get absolute path", "1", p.get("/abs/path"));
|
||||||
|
@ -158,6 +129,7 @@ public class PathMapTest extends TestCase
|
||||||
/**
|
/**
|
||||||
* See JIRA issue: JETTY-88.
|
* See JIRA issue: JETTY-88.
|
||||||
*/
|
*/
|
||||||
|
@Test
|
||||||
public void testPathMappingsOnlyMatchOnDirectoryNames() throws Exception
|
public void testPathMappingsOnlyMatchOnDirectoryNames() throws Exception
|
||||||
{
|
{
|
||||||
String spec = "/xyz/*";
|
String spec = "/xyz/*";
|
||||||
|
|
Loading…
Reference in New Issue