HTTP Implementation Sketchy in CF 5?

By davidjmedlock
We teamed up with SiteGround
To bring you up to 65% off web hosting, plus free access to the entire SitePoint Premium library (worth $99). Get SiteGround + SitePoint Premium Now

…posted by davidjmedlock:

Okay, this is a bit of an annoyance. I was writing an application for managing logos in a system where many clients log in. We’d get the client ID, retrieve the most recent logo and display it. The problem was, this system was written in ColdFusion, but had to be used in a .Net app, as well.

No problem, I thought. I can use CFCONTENT to return this as an image and all they have to do is put the URL to the CF template path in their IMG SRC attribute, like this:



Then in the CF template, I’d do this:





But, does this work in ColdFusion 5? No! Apparently CF 5 has some issues with its HTTP implementation. Whenever I did the tag in an actual application, it ended up not loading the image. When I went directly to that page, I just got a blank page.

Now, I’ve talked with another developer that had attempted something vaguely similar to this before and had problems with CF handling HTTP. If I run this code:


gif.html:


returngif.cfm:

It works okay. Now, I know some are going to say “Did the file that you were trying to return actually exist ?” Yes it did. I double, triple and quadruple checked that. I checked everything I could think of, making sure the file existed, that it was returning the correct MIME type, etc. etc. etc. Still no luck. Ah well, just one more query for the .Net guy to run…

BTW – I haven’t forgotten about the BlueDragon testing. I actually downloaded it and the installation guide. Unfortunately, you can’t have BlueDragon and ColdFusion installed on the same IIS server, so I’ll have to wait until I have time to uninstall/reinstall, etc. before I can test it. Also, they’re currently developing a .Net version of BlueDragon that will allow ColdFusion to integrate with .Net as it integrates with Java. Yay!

‘Til next time, have fun!

We teamed up with SiteGround
To bring you up to 65% off web hosting, plus free access to the entire SitePoint Premium library (worth $99). Get SiteGround + SitePoint Premium Now
Login or Create Account to Comment
Login Create Account