Julian,
I have successfully loaded a pdf from file like you said. This tells me it
as to do with the API call itself.
After some more debug sessions, I turned on Network inspector in my browser
and compare the request header (from cf11 vs Lucee) and I found some
mismatch.
When using the followign code (used to retreive tracking info on a
shippment)
Lucee seems to had things to my header, for example:
Accept-Language in CF11 = “en-US” becomes in Lucee “en-US,en;q=0.5”
the same goes for Accept:
CF11: text/html, application/xhtml+xml, /
Lucee: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
The first thing wrong of course it that Lucee adds some q= stuff compared
to CF. But also, both fields do not match what I have in
the cfhttpparam value. This probably means I did not figure out how to get
the header of this particular code… and that I’ve pasted here only the
header for the page in general, not the api cfhttp call. Either way,
my api call will not work if Lucee adds stuff to my headers.
So where do I go from here?
Thank youOn Thursday, October 1, 2015 at 4:14:49 PM UTC-4, Dominique Dupuis wrote:
On CF10-11 I used this: to display my shipping (canada post) label
so I can print it.
A dump of the respond from Canada post API (cfhttp.FileContent) looks like
this on Lucee (but shorten quite a lot) (with the only difference being
that byte[] is binary[] on cf10 dump) :
Native Array (byte[])Raw[60,63,120,115,99,1(…lots more
numbers…)15,97,103,101,115,62]
Base64 EncodedPD94(…lots more
whatever…)wIiBl]
On Lucee, the browser is telling me that “This PDF doc might not be
displayed correctly”… and it does not display at all. The browser offers
to try opening it with different viewers but the result is the same when I
do. They don’t read it as being a pdf file. Either Lucee can’t use pdf as
type for the tag cfcontent, or maybe conversion of raw fails. The wed
site: <cfcontent> :: Lucee Documentation does not specify
any accepted type for cfcontet. So I’m left in the dark as to what is wrong.
Another post in Railo seems to be related to a somewhat similar situation (
Redirecting to Google Groups)
, but I don’t understand the solution.
Dominique