最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Why is my Mirth channel failing to read full PDFs from cURL requests? - Stack Overflow

programmeradmin1浏览0评论

I have a channel in Mirth that exists to receive files from a webserver and push them to an SMB share.

When I try to use code (or the command line curl command) to make the HTTP request to Mirth, the PDF that I'm sending the webserver is somehow corrupted. When we try to open the file placed on the SMB share via cURL, the PDF will not open, saying it is corrupted.

When I make the exact same call to , I can see the PDF as an attachment and download it fully-intact.

I know the issue is on the Source side, because if I manipulate an already-sent message with a PDF the file will show up on the destination SMB share fully-intact.

I'm using Mirth 4.2.0. My configuration for the Source channel is:

  • HTTP Listener
  • Process Batch: No
  • Authentication: None
  • Receive Timeout: 50000
  • Message Content: Plain Body
  • Binary MIME Types: application/.*(?<!json|xml|form-data)$|image/.*|video/.*|audio/.*|application/pdf/.*

My data types are all set to RAW on the Source and Destination.

My cURL command (from the console) is:

curl -v -X POST \
  -H "X-Variableone: known_good.pdf" \
  -H "X-Variabletwo: Variable Two" \
  -H "Content-Type: application/pdf" \
  -H "Expect:" \
  --data-binary @/path/to/file/z_2025-04-01_21-33-33.pdf \
  :99999

Again, if I try to make the above cURL request to Mirth the file is broken in the destination SMB share, but when I try the above command to a website like , I can see the file and download it. This tells me the cURL command is good, the issue lies in my Mirth configuration.

What configuration options can I try to change on the Source connector (or the Summary tab) to make sure that the file gets to the destination intact?

发布评论

评论列表(0)

  1. 暂无评论