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

Hudson commented on TIKA-4932:
------------------------------

SUCCESS: Integrated in Jenkins build Tika » tika-main-jdk17 #1677 (See 
[https://ci-builds.apache.org/job/Tika/job/tika-main-jdk17/1677/])
TIKA-4932: pipes no longer copies the caller's Content-Type hint back… (#3258) 
(github: 
[https://github.com/apache/tika/commit/5c1cda53bfd99c93f0190ff5b7f3585f268c5b06])
* (edit) 
tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/server/PipesWorker.java
* (edit) 
tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/resource/TikaResource.java
* (edit) CHANGES.txt
* (edit) 
tika-pipes/tika-pipes-core/src/test/java/org/apache/tika/pipes/core/server/EmitHandlerUserMetadataTest.java
* (edit) 
tika-server/tika-server-core/src/test/java/org/apache/tika/server/core/TikaResourceTest.java
* (edit) 
tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/server/EmitHandler.java
* (edit) 
tika-pipes/tika-pipes-fork-parser/src/test/java/org/apache/tika/pipes/fork/PipesForkParserTest.java


> 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
>             Fix For: 4.1.0
>
>
> :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