mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-09-28 16:45:41 +00:00
FetchHTTPRequest - include CrawlURI.getData().get("customHttpRequestHeaders"), if any, in http request
This commit is contained in:
@@ -244,6 +244,14 @@ class FetchHTTPRequest {
|
||||
logger.warning("Invalid accept header: " + headerString);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, String> uriCustomHeaders = (Map<String, String>) curi.getData().get("customHttpRequestHeaders");
|
||||
if (uriCustomHeaders != null) {
|
||||
for (Entry<String, String> h: uriCustomHeaders.entrySet()) {
|
||||
request.addHeader(h.getKey(), h.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user