mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-09-23 14:15:47 +00:00
* 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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user