Revert "473243 Delay resource close for async default content"
This reverts commit e4bf5d888c
.
Wrong commit message
This commit is contained in:
parent
e4bf5d888c
commit
d8c94ea27b
|
@ -301,7 +301,7 @@ public class URLResource extends Resource
|
||||||
|
|
||||||
path = URIUtil.canonicalPath(path);
|
path = URIUtil.canonicalPath(path);
|
||||||
|
|
||||||
return newResource(URIUtil.addPaths(_url.toExternalForm(),URIUtil.encodePath(path)), _useCaches);
|
return newResource(URIUtil.addPaths(_url.toExternalForm(),path), _useCaches);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
|
|
|
@ -38,8 +38,6 @@ import java.util.zip.ZipFile;
|
||||||
import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
|
import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
|
||||||
import org.eclipse.jetty.toolchain.test.OS;
|
import org.eclipse.jetty.toolchain.test.OS;
|
||||||
import org.eclipse.jetty.util.IO;
|
import org.eclipse.jetty.util.IO;
|
||||||
import org.hamcrest.Matchers;
|
|
||||||
import org.junit.Assert;
|
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
@ -346,21 +344,6 @@ public class ResourceTest
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------ */
|
|
||||||
@Test
|
|
||||||
public void testEncodeAddPath ()
|
|
||||||
throws Exception
|
|
||||||
{
|
|
||||||
Resource r;
|
|
||||||
|
|
||||||
r = Resource.newResource(__userURL+"TestData/").addPath("foo%/b r");
|
|
||||||
Assert.assertThat(r.getURI().toString(),Matchers.endsWith("/foo%25/b%20r"));
|
|
||||||
|
|
||||||
r = Resource.newResource("jar:"+__userURL+"TestData/test.zip!/subdir/").addPath("foo%/b r");
|
|
||||||
Assert.assertThat(r.getURI().toString(),Matchers.endsWith("/foo%25/b%20r"));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
@Test
|
@Test
|
||||||
public void testJarFileCopyToDirectoryTraversal () throws Exception
|
public void testJarFileCopyToDirectoryTraversal () throws Exception
|
||||||
|
|
Loading…
Reference in New Issue