@Test public void testEvilImage2() throws Exception { try { HttpResponse resp = createResponse("org/apache/shindig/gadgets/rewrite/image/evil2.bmp", "image/bmp"); rewrite(resp); fail("Evil image should not be readable"); } catch (RuntimeException re) { log.log(Level.INFO, "Good failure while reading evil image", re); } }
@Test public void testSimpleImage() throws Exception { HttpResponse resp = createResponse("org/apache/shindig/gadgets/rewrite/image/simple.bmp", "image/bmp"); HttpResponse rewritten = rewrite(resp); assertTrue(rewritten.getContentLength() < resp.getContentLength()); assertEquals("image/png", rewritten.getHeader("Content-Type")); }
@Test public void testSimpleImage() throws Exception { HttpResponse resp = createResponse("org/apache/shindig/gadgets/rewrite/image/simple.bmp", "image/bmp"); HttpResponse rewritten = rewrite(resp); assertTrue(rewritten.getContentLength() < resp.getContentLength()); assertEquals("image/png", rewritten.getHeader("Content-Type")); }
@Test public void testEvilImage2() throws Exception { try { HttpResponse resp = createResponse("org/apache/shindig/gadgets/rewrite/image/evil2.bmp", "image/bmp"); rewrite(resp); fail("Evil image should not be readable"); } catch (RuntimeException re) { log.log(Level.INFO, "Good failure while reading evil image", re); } }
@Test public void testSimpleImage() throws Exception { HttpResponse resp = createResponse("org/apache/shindig/gadgets/rewrite/image/simple.bmp", "image/bmp"); HttpResponse rewritten = rewrite(resp); assertTrue(rewritten.getContentLength() < resp.getContentLength()); assertEquals("image/png", rewritten.getHeader("Content-Type")); }
@Test public void testEvilImage2() throws Exception { try { HttpResponse resp = createResponse("org/apache/shindig/gadgets/rewrite/image/evil2.bmp", "image/bmp"); rewrite(resp); fail("Evil image should not be readable"); } catch (RuntimeException re) { log.log(Level.INFO, "Good failure while reading evil image", re); } }
@Test @Ignore("Kills some VMs") public void testEvilImages() throws Exception { try { HttpResponse resp = createResponse("org/apache/shindig/gadgets/rewrite/image/evil.bmp", "image/bmp"); rewrite(resp); fail("Evil image should not be readable"); } catch (RuntimeException re) { log.log(Level.INFO, "Good failure while reading evil image", re); } }
@Test @Ignore("Kills some VMs") public void testEvilImages() throws Exception { try { HttpResponse resp = createResponse("org/apache/shindig/gadgets/rewrite/image/evil.bmp", "image/bmp"); rewrite(resp); fail("Evil image should not be readable"); } catch (RuntimeException re) { log.log(Level.INFO, "Good failure while reading evil image", re); } }
@Test @Ignore("Kills some VMs") public void testEvilImages() throws Exception { try { HttpResponse resp = createResponse("org/apache/shindig/gadgets/rewrite/image/evil.bmp", "image/bmp"); rewrite(resp); fail("Evil image should not be readable"); } catch (RuntimeException re) { log.log(Level.INFO, "Good failure while reading evil image", re); } }