nddipiazza commented on code in PR #1737: URL: https://github.com/apache/tika/pull/1737#discussion_r1583602257
########## tika-pipes/tika-fetchers/tika-fetcher-http/src/main/java/org/apache/tika/pipes/fetcher/http/HttpFetcher.java: ########## @@ -143,10 +143,24 @@ public InputStream fetch(String fetchKey, Metadata metadata) throws IOException, .setMaxRedirects(maxRedirects) .setRedirectsEnabled(true).build(); get.setConfig(requestConfig); - if (! StringUtils.isBlank(userAgent)) { + setHttpRequestHeaders(metadata, get); + return execute(get, metadata, httpClient, true); + } + + private void setHttpRequestHeaders(Metadata metadata, HttpGet get) { + if (!StringUtils.isBlank(userAgent)) { get.setHeader(USER_AGENT, userAgent); } - return execute(get, metadata, httpClient, true); + // additional http request headers can be sent in here. + String[] httpRequestHeaders = metadata.getValues("httpRequestHeaders"); Review Comment: httpHeaders is a config parameter that is for storing some of the http headers on the response. I will look into documenting the jsons somehow to prevent confusion in future. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tika.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org