GetHttprequestData().content with binary create corrupted files

An external API send me a PDF submitting via http post. Pdf data (binary) is sent in the body. To catch this pdf and save it to disk I’ve tried to use this simple statement:

<cffile action="write" output="#getHTTPRequestData().content#" file="/mypath/myfilename.pdf">

The resulting pdf is similar to the original but it’s not the same, it’s corrupted.
It seems that GetHttprequestData().content changes the content.

Editing hex files I noticed that GetHttprequestData().content, larger in size, is filled with EF BD EF hex.
It’s a GetHttprequestData().content problem or I missing something?
How can I get simply the binary data?
Thanks in advance

I’M using Lucee on Debian 10

Something to try - cfpdf, pass .content to source attribute

Done… something worse happened… the page timeout… if I increase timeout on page with:

<cfsetting requesttimeout = "1800000">

after 1 minute i get:

"ERROR","http-nio-8888-exec-155","01/25/2021","00:40:55","","Java heap space;Java heap space;lucee.runtime.exp.NativeException: Java heap space

However getHTTPRequestData().content already contains all PDF, there is no reason to pass it again to cfpdf.