CFHTTP Connection Failure

September 28, 2009 at 9:05 pm 8 comments


If you’re getting a “Connection Failure” error when using the ColdFusion CFHTTP tag and have absolutely no idea what the problem could be as surfing the page via the browser works, then the web server most likely compresses the content and ColdFusion can’t handle the output.

To fix this issue just add the following two cfhttpparam tags to the request, they will tell the remote web server not to return a compressed response.

<cfhttpparam type=”header” name=”accept-encoding” value=”deflate;q=0″>
<cfhttpparam type=”header” name=”te” value=”deflate;q=0″>

Advertisements

Entry filed under: ColdFusion. Tags: , , .

Google Adwords Advertising Professional Brisbane SEO

8 Comments Add your own

  • 1. Chris  |  October 22, 2009 at 3:34 pm

    Thanks for the article but this didn’t help my situation 😦 I am so confused. I have 2 sites running on the same server using the exact same code. I use cfhttp to create seo friendly urls through a 404 page.

    This site works…
    http://www.kimcan.ca/testimonials

    This doesn’t…
    http://www.massagetherapybodymind.com/about-me
    In this one, the actual page that the cfhttp is going to is http://www.massagetherapybodymind.com/index.cfm?pageid=406 … which works.

    Any help would be greatly appreciated.

    Chris

    Like

    Reply
  • 2. Taco Fleur  |  December 19, 2009 at 7:35 am

    Just adding some keywords so I will be able to find my own post next time 😉
    cfhttp
    iis compression
    status code unavailable
    cfhttpparam
    disable iss compression

    Like

    Reply
  • 3. happy  |  September 15, 2010 at 11:35 am

    This one works for me ..Thanks…

    Like

    Reply
  • 4. Ben L  |  February 18, 2011 at 2:01 pm

    Thanks so much for this post. I was getting free XML weather files and was getting Connection Failure about half the time, then after 1 year or more, started getting Connection Failure every time. Spent several hours this morning trying to resolve the problem and thanks to google I found your post…THANKS, works everytime now.

    Like

    Reply
  • 5. Tina  |  August 10, 2011 at 8:22 pm

    I know this is an old post, but still very applicable. Thank You!!!!! After a couple of hours of hitting a wall trying to figure out why I was getting “Connection Failure”, I ran across this post, and ten seconds later my app was humming again. This works great, thank you.

    Like

    Reply
  • 6. glenn peterson  |  January 21, 2012 at 10:49 pm

    thanks for this post. i was having immediate problems when moving from a CF 8 server to a CF 9 server. The xml file being fetched was exactly the same but something about the CF 9 XML parser is not working the same. your httpparam code fixed the issue.

    Like

    Reply
  • 7. James Steubing  |  October 31, 2014 at 5:14 am

    Worked for me. Thanks for posting this.

    By the way, if you copy and paste the two cfhttpparam tags from this post, it will use weird quotes around each option in the tags. You need to manually replace all of them.

    Like

    Reply
    • 8. James Steubing  |  October 31, 2014 at 5:15 am

      at least it did in Eclipse.

      Like

      Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 19 other followers

Archives

Top Rated

Top Clicks

  • None

Blog Stats

  • 168,382 hits

%d bloggers like this: