FetchHTTPRequest - include CrawlURI.getData().get("customHttpRequestHeaders"), if any, in http request

This commit is contained in:
Noah Levitt
2014-02-03 18:41:23 -08:00
parent ecb0eaf435
commit af44522fdf
@@ -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());
}
}
}
/**