Blog Archives - 2 Record(s)

Year: '2015' - Month: '2'

CFHTTP using script

So I thought since CF11 allows the use of script tags that maybe I had a work around for the Update 3 bug. I rewrote my code as shown below but I still get the issue with the file being empty.

 

function elasticEmail2(event,rc)

{

 

cfhttp(result = "LOCAL.result",method = "put",

        url = "https://api.elasticemail.com/attachments/upload?username=no-reply@nations-baseball.com&api_key=removed&file=EGTest",

        getAsBinary = "yes")

        {

        cfhttpParam(type = "file",name="EGTest",file="c:\somefolder\test.csv",mimetype="Content-type: text/csv");

        cfhttpParam(type="formfield",name="username",value="no-reply@nations-baseball.com");

        cfhttpParam(type="formfield",name="api_key",value="removed");

        cfhttpParam(type="formfield",name="filename",value="EGTest");

        } 

        

  cfhttp(result = "LOCAL.result2",method = "post",

        url = "https://api.elasticemail.com/mailer/send")

        {

         cfhttpParam(type="formfield",name="username",value="no-reply@nations-baseball.com");

         cfhttpParam(type="formfield",name="api_key",value="removed");

         cfhttpParam(type="formfield",name="subject",value="Test");

         cfhttpParam(type="formfield",name="data_source",value="EGTest");

         cfhttpParam(type="formfield",name="template",value="BlankTemplate");

        } 

writedump(LOCAL);abort;  

   

}

 

Bug filed here:

https://bugbase.adobe.com/index.cfm?event=bug&id=3940770

 

 

Coldfusion 11 Update 3 has an issue with using HTTP to put files

ColdFusion

So I've blogged about all this Elastic Email stuff. One of things that I do is create csv files that are then posted via API using http to Elastic Email using the mail merge API.  I recently migrated servers and suddenly had a issue. I was previously using CF9 and everything was good. Well I jumped all the way to CF11. I had tested my code in Dev which was CF11 so I thought I was good to go. Well I didn't check but my dev server was running 11,0,0,289974 and prod was running update 3. I downgraded and I was back in business.

As the updater says....

"ColdFusion 11 Update 3 includes support for JDK 8, Tomcat 7.0.54 and other platforms/servers/databases besides ~195 bug fixes (internal and external) in AJAX, Charting, Caching, Database, Language, Mobile Support, Net Protocols, Security and other areas."

....but it also introduces a cfscript http put bug.