* FetchHTTPTests.java

testLaxUrlEncoding() - Tests a URL not correctly url-encoded, but that heritrix should let pass through to mimic browser behavior (test fails currently)
This commit is contained in:
Noah Levitt
2012-12-20 11:14:16 -08:00
parent c7813938e0
commit e26ee96895
@@ -771,6 +771,21 @@ public class FetchHTTPTests extends ProcessorTestBase {
noResponseServer.join();
}
/**
* Tests a URL not correctly url-encoded, but that heritrix lets pass
* through to mimic browser behavior. {@link java.net.URI} would reject this
* url. See class comment on {@link UURI}.
*
* @throws Exception
*/
public void testLaxUrlEncoding() throws Exception {
CrawlURI curi = makeCrawlURI("http://localhost:7777/99%");
fetcher().process(curi);
// logger.info('\n' + httpRequestString(curi) + "\n\n" + rawResponseString(curi));
assertTrue(httpRequestString(curi).startsWith("GET /99% HTTP/1.0\r\n"));
runDefaultChecks(curi, "requestLine");
}
@Override
protected FetchHTTP makeModule() throws IOException {
FetchHTTP fetchHttp = newTestFetchHttp(getUserAgentString());