Skip to content
This repository has been archived by the owner on Nov 9, 2024. It is now read-only.

Commit

Permalink
Merge 40ae65d into 52cd8cf
Browse files Browse the repository at this point in the history
  • Loading branch information
AnalogJ authored Mar 6, 2020
2 parents 52cd8cf + 40ae65d commit 96ea9c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/processor/document/document.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,8 @@ func (dp *DocumentProcessor) parseDocument(bucketName string, bucketPath string,
return model.Document{}, err
}
//trim whitespace/newline characters
dp.logger.Debugf("docContent: %s", docContent)
dp.logger.Debugf("trim Content: %s", strings.TrimSpace(docContent))
//docContent = strings.TrimSpace(docContent)
docContent = strings.TrimSpace(docContent)
dp.logger.Debugf("docContent: '%s'", docContent)

metaFile, err := os.Open(localFilePath)
if err != nil {
Expand Down
3 changes: 3 additions & 0 deletions pkg/processor/document/tika_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ func (mrt TikaRoundTripper) RoundTrip(r *http.Request) (*http.Response, error) {
if r.URL.Path == "/meta" {
r.Header.Add("Accept", "application/json")
}
if r.URL.Path == "/tika" {
r.Header.Add("Accept", "text/plain")
}

return mrt.r.RoundTrip(r)
}

0 comments on commit 96ea9c0

Please sign in to comment.