[ 
https://issues.apache.org/jira/browse/TIKA-4932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18119419#comment-18119419
 ] 

ASF GitHub Bot commented on TIKA-4932:
--------------------------------------

tballison merged PR #3258:
URL: https://github.com/apache/tika/pull/3258




> PipesForkParser: metadata passed to parse() overwrites the fork's parse 
> results
> -------------------------------------------------------------------------------
>
>                 Key: TIKA-4932
>                 URL: https://issues.apache.org/jira/browse/TIKA-4932
>             Project: Tika
>          Issue Type: Task
>            Reporter: Tim Allison
>            Priority: Major
>
> :robot: :
> PipesForkParser.parse(tis, metadata, context) sends the caller's metadata as 
> the tuple's user metadata. EmitHandler.injectUserMetadata() then overwrites 
> the parsed values with it. Callers pass
>   Content-Type and resourceName as hints for detection, as they would to 
> Parser.parse(). What they get back is their own hint in place of the detected 
> type. For example, a PDF served as text/html; 
>   charset=UTF-8 comes back with the raw header value as its Content-Type.
>   The overwrite is intended for async and server users, who inject IDs this 
> way, so the fix belongs in PipesForkParser: metadata the caller passes should 
> be used for detection and parsing, not
>   injected back into the result. Tell users about the behavior change in the 
> release notes.
>  
> Found by [~dpol1]  on apache/stormcrawler#2183.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to